Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0867b33

Browse files
committed
Merge pull request #459 from geocoder-php/fix-stream
Add __toString to StreamInterface mock
2 parents ac8f538 + 8a3d07e commit 0867b33

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/Geocoder/Tests/TestCase.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ protected function getMockAdapter($expects = null)
2121
$expects = $this->once();
2222
}
2323

24+
$stream = $this->getMock('Psr\Http\Message\StreamInterface');
25+
$stream
26+
->expects($this->any())
27+
->method('__toString')
28+
->will($this->returnValue(''));
29+
2430
$response = $this->getMock('Psr\Http\Message\MessageInterface');
2531
$response
2632
->expects($this->any())
2733
->method('getBody')
28-
->will($this->returnValue(
29-
$this->getMock('Psr\Http\Message\StreamInterface')
30-
));
34+
->will($this->returnValue($stream));
3135

3236
$adapter = $this->getMock('Ivory\HttpAdapter\HttpAdapterInterface');
3337
$adapter

0 commit comments

Comments
 (0)