1111namespace chillerlan \OAuthTest \Providers ;
1212
1313use chillerlan \DotEnv \DotEnv ;
14- use Psr \Http \Message \{RequestFactoryInterface , ResponseFactoryInterface , StreamFactoryInterface };
14+ use Psr \Http \Message \{RequestFactoryInterface , ResponseFactoryInterface , StreamFactoryInterface , UriFactoryInterface };
1515use chillerlan \OAuth \Core \OAuthInterface ;
1616use chillerlan \OAuth \OAuthOptions ;
1717use chillerlan \OAuth \Storage \MemoryStorage ;
@@ -35,6 +35,7 @@ abstract class ProviderTestAbstract extends TestCase{
3535 'requestFactory ' => 'REQUEST_FACTORY ' ,
3636 'responseFactory ' => 'RESPONSE_FACTORY ' ,
3737 'streamFactory ' => 'STREAM_FACTORY ' ,
38+ 'uriFactory ' => 'URI_FACTORY ' ,
3839 ];
3940
4041 /** @var \chillerlan\OAuth\OAuthOptions|\chillerlan\Settings\SettingsContainerInterface */
@@ -47,6 +48,7 @@ abstract class ProviderTestAbstract extends TestCase{
4748 protected RequestFactoryInterface $ requestFactory ;
4849 protected ResponseFactoryInterface $ responseFactory ;
4950 protected StreamFactoryInterface $ streamFactory ;
51+ protected UriFactoryInterface $ uriFactory ;
5052 protected ClientInterface $ http ;
5153 protected LoggerInterface $ logger ;
5254
@@ -88,6 +90,12 @@ protected function setUp():void{
8890 $ this ->reflection = new ReflectionClass ($ this ->FQN );
8991 /** @noinspection PhpFieldAssignmentTypeMismatchInspection */
9092 $ this ->provider = $ this ->reflection ->newInstanceArgs ([$ this ->http , $ this ->storage , $ this ->options , $ this ->logger ]);
93+
94+ $ this ->provider
95+ ->setRequestFactory ($ this ->requestFactory )
96+ ->setStreamFactory ($ this ->streamFactory )
97+ ->setUriFactory ($ this ->uriFactory )
98+ ;
9199 }
92100
93101 protected function initOptions ():SettingsContainerInterface {
0 commit comments