88use GuzzleHttp \Psr7 \Response ;
99use GuzzleHttp \Psr7 \ServerRequest ;
1010use GuzzleHttp \Psr7 \Uri ;
11+ use GuzzleHttp \Psr7 \Utils ;
1112use HansOtt \PSR7Cookies \SetCookie ;
1213use InvalidArgumentException ;
1314use PHPUnit \Framework \TestCase ;
1415use Psr \Http \Message \RequestInterface ;
1516use Psr \Http \Message \ResponseInterface ;
1617use Psr \Http \Message \ServerRequestInterface ;
1718
18- use function GuzzleHttp \Psr7 \stream_for ;
1919use function json_encode ;
2020use function sprintf ;
2121
@@ -33,7 +33,7 @@ protected function makeGoodResponse(string $path, string $method): ResponseInter
3333 return (new Response ())
3434 ->withHeader ('Content-Type ' , 'application/json ' )
3535 ->withHeader ('Header-B ' , 'good value ' )
36- ->withBody (stream_for (json_encode ($ body )));
36+ ->withBody (Utils:: streamFor (json_encode ($ body )));
3737
3838 case 'post /cookies ' :
3939 $ response = (new Response ())
@@ -72,7 +72,7 @@ protected function makeGoodServerRequest(string $path, string $method): ServerRe
7272
7373 return $ request
7474 ->withHeader ('Content-Type ' , 'application/json ' )
75- ->withBody (stream_for (json_encode ($ body )));
75+ ->withBody (Utils:: streamFor (json_encode ($ body )));
7676
7777 default :
7878 throw new InvalidArgumentException (sprintf ("unexpected operation '%s %s'' " , $ method , $ path ));
@@ -104,7 +104,7 @@ protected function makeGoodRequest(string $path, string $method): RequestInterfa
104104
105105 return $ request
106106 ->withHeader ('Content-Type ' , 'application/json ' )
107- ->withBody (stream_for (json_encode ($ body )));
107+ ->withBody (Utils:: streamFor (json_encode ($ body )));
108108
109109 default :
110110 throw new InvalidArgumentException (sprintf ("unexpected operation '%s %s'' " , $ method , $ path ));
0 commit comments