File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 25
25
"require" : {
26
26
"php" : " ^8.0" ,
27
27
"ext-json" : " *" ,
28
- "league/openapi-psr7-validator" : " ^0.21 " ,
28
+ "league/openapi-psr7-validator" : " ^0.22 " ,
29
29
"nyholm/psr7" : " ^1.3.1" ,
30
30
"psr/cache" : " ^1.0 || ^2.0 || ^3.0" ,
31
- "psr/http-message" : " ^1.0" ,
31
+ "psr/http-message" : " ^1.0 || ^2.0 " ,
32
32
"psr/simple-cache" : " ^1.0 || ^2.0 || ^3.0" ,
33
33
"symfony/cache" : " ^5.0.9 || ^6.0 || ^7.0" ,
34
34
"symfony/http-foundation" : " ^5.0.9 || ^6.0 || ^7.0" ,
35
- "symfony/psr-http-message-bridge" : " ^2.0.1 || ^7.0"
35
+ "symfony/psr-http-message-bridge" : " ^2.0 || ^6.0 || ^7.0"
36
36
},
37
37
"require-dev" : {
38
38
"friendsofphp/php-cs-fixer" : " ^3.17" ,
Original file line number Diff line number Diff line change 7
7
use Nyholm \Psr7 \Factory \Psr17Factory ;
8
8
use Psr \Http \Message \ResponseInterface ;
9
9
use Psr \Http \Message \ServerRequestInterface ;
10
+ use Psr \Http \Message \StreamInterface ;
10
11
use Symfony \Component \HttpFoundation \Request ;
11
12
use Symfony \Component \HttpFoundation \Response ;
12
13
@@ -42,7 +43,10 @@ protected function psr7Response(?array $content = null): ResponseInterface
42
43
return $ response ;
43
44
}
44
45
45
- $ response ->method ('getBody ' )->willReturn (json_encode ($ content , JSON_THROW_ON_ERROR ));
46
+ $ body = $ this ->createMock (StreamInterface::class);
47
+ $ body ->method ('__toString ' )->willReturn (json_encode ($ content , JSON_THROW_ON_ERROR ));
48
+
49
+ $ response ->method ('getBody ' )->willReturn ($ body );
46
50
$ response ->method ('getStatusCode ' )->willReturn (Response::HTTP_OK );
47
51
$ response ->method ('getHeader ' )->willReturn (['application/json ' ]);
48
52
You can’t perform that action at this time.
0 commit comments