File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,13 @@ protected function doSend(InternalRequestInterface $internalRequest)
43
43
$ content = unserialize (file_get_contents ($ file ));
44
44
$ body = new StringStream ($ content );
45
45
46
- $ response = $ this ->adapter ->getConfiguration ()->getMessageFactory ()->createResponse ();
47
- $ response ->setBody ($ body );
46
+ $ response = $ this ->adapter ->getConfiguration ()->getMessageFactory ()->createResponse (
47
+ 200 ,
48
+ 'OK ' ,
49
+ '1.1 ' ,
50
+ [],
51
+ $ body
52
+ );
48
53
49
54
if (!empty ($ content )) {
50
55
return $ response ;
Original file line number Diff line number Diff line change @@ -21,7 +21,13 @@ protected function getMockAdapter($expects = null)
21
21
$ expects = $ this ->once ();
22
22
}
23
23
24
- $ response = $ this ->getMock ('Psr\Http\Message\ResponseInterface ' );
24
+ $ response = $ this ->getMock ('Psr\Http\Message\MessageInterface ' );
25
+ $ response
26
+ ->expects ($ expects )
27
+ ->method ('getBody ' )
28
+ ->will ($ this ->returnValue (
29
+ $ this ->getMock ('Psr\Http\Message\StreamableInterface ' )
30
+ ));
25
31
26
32
$ adapter = $ this ->getMock ('Ivory\HttpAdapter\HttpAdapterInterface ' );
27
33
$ adapter
@@ -44,7 +50,7 @@ protected function getMockAdapterReturns($returnValue)
44
50
->method ('__toString ' )
45
51
->will ($ this ->returnValue ((string ) $ returnValue ));
46
52
47
- $ response = $ this ->getMock ('Psr\Http\Message\ResponseInterface ' );
53
+ $ response = $ this ->getMock ('Psr\Http\Message\MessageInterface ' );
48
54
$ response
49
55
->expects ($ this ->once ())
50
56
->method ('getBody ' )
You can’t perform that action at this time.
0 commit comments