public function StreamWrapperTest::testCanOpenReadonlyStream in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/psr7/tests/StreamWrapperTest.php \GuzzleHttp\Tests\Psr7\StreamWrapperTest::testCanOpenReadonlyStream()
File
- vendor/
guzzlehttp/ psr7/ tests/ StreamWrapperTest.php, line 85
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testCanOpenReadonlyStream() {
$stream = $this
->getMockBuilder('Psr\\Http\\Message\\StreamInterface')
->setMethods([
'isReadable',
'isWritable',
])
->getMockForAbstractClass();
$stream
->expects($this
->once())
->method('isReadable')
->will($this
->returnValue(false));
$stream
->expects($this
->once())
->method('isWritable')
->will($this
->returnValue(true));
$r = StreamWrapper::getResource($stream);
$this
->assertInternalType('resource', $r);
fclose($r);
}