22
33namespace Swis \Http \Fixture \Tests ;
44
5- use function GuzzleHttp \Psr7 \stream_for ;
5+ use GuzzleHttp \Psr7 \Utils ;
66use Http \Discovery \MessageFactoryDiscovery ;
77use PHPUnit \Framework \TestCase ;
88use Swis \Http \Fixture \MockNotFoundException ;
@@ -29,7 +29,7 @@ public function itCanBuildAResponse(string $url, string $method, string $expecte
2929 200 ,
3030 null ,
3131 [],
32- stream_for (file_get_contents ($ this ->getFixturesPath ().'/ ' .$ expectedMock ))
32+ Utils:: streamFor (file_get_contents ($ this ->getFixturesPath ().'/ ' .$ expectedMock ))
3333 );
3434 $ actualResponse = $ builder ->build (
3535 $ messageFactory ->createRequest ($ method , $ url )
@@ -118,7 +118,7 @@ public function itCanBuildAResponseUsingDomainAliases()
118118 200 ,
119119 '' ,
120120 [],
121- stream_for (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
121+ Utils:: streamFor (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
122122 );
123123
124124 $ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://foo.bar/api/articles ' ));
@@ -137,7 +137,7 @@ public function itCanBuildAResponseWithCustomHeaders()
137137 200 ,
138138 '' ,
139139 ['X-Made-With ' => 'PHPUnit ' ],
140- stream_for (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
140+ Utils:: streamFor (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
141141 );
142142
143143 $ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://example.com/api/articles ' ));
@@ -156,7 +156,7 @@ public function itCanBuildAResponseWithCustomStatus()
156156 500 ,
157157 '' ,
158158 [],
159- stream_for (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
159+ Utils:: streamFor (file_get_contents ($ this ->getFixturesPath ().'/example.com/api/articles.mock ' ))
160160 );
161161 $ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://example.com/api/articles ' ));
162162
0 commit comments