2
2
3
3
namespace Swis \Http \Fixture \Tests ;
4
4
5
- use function GuzzleHttp \Psr7 \stream_for ;
5
+ use GuzzleHttp \Psr7 \Utils ;
6
6
use Http \Discovery \MessageFactoryDiscovery ;
7
7
use PHPUnit \Framework \TestCase ;
8
8
use Swis \Http \Fixture \MockNotFoundException ;
@@ -29,7 +29,7 @@ public function itCanBuildAResponse(string $url, string $method, string $expecte
29
29
200 ,
30
30
null ,
31
31
[],
32
- stream_for (file_get_contents ($ this ->getFixturesPath ().'/ ' .$ expectedMock ))
32
+ Utils:: streamFor (file_get_contents ($ this ->getFixturesPath ().'/ ' .$ expectedMock ))
33
33
);
34
34
$ actualResponse = $ builder ->build (
35
35
$ messageFactory ->createRequest ($ method , $ url )
@@ -118,7 +118,7 @@ public function itCanBuildAResponseUsingDomainAliases()
118
118
200 ,
119
119
'' ,
120
120
[],
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 ' ))
122
122
);
123
123
124
124
$ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://foo.bar/api/articles ' ));
@@ -137,7 +137,7 @@ public function itCanBuildAResponseWithCustomHeaders()
137
137
200 ,
138
138
'' ,
139
139
['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 ' ))
141
141
);
142
142
143
143
$ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://example.com/api/articles ' ));
@@ -156,7 +156,7 @@ public function itCanBuildAResponseWithCustomStatus()
156
156
500 ,
157
157
'' ,
158
158
[],
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 ' ))
160
160
);
161
161
$ actualResponse = $ this ->getBuilder ()->build ($ messageFactory ->createRequest ('GET ' , 'http://example.com/api/articles ' ));
162
162
0 commit comments