PhlyTest\Http\StreamTest::testReadRaisesExceptionWhenStreamIsDetached PHP Method

testReadRaisesExceptionWhenStreamIsDetached() public method

    public function testReadRaisesExceptionWhenStreamIsDetached()
    {
        $this->tmpnam = tempnam(sys_get_temp_dir(), 'phly');
        file_put_contents($this->tmpnam, 'FOO BAR');
        $resource = fopen($this->tmpnam, 'r');
        $stream = new Stream($resource);
        $stream->detach();
        $this->setExpectedException('RuntimeException', 'No resource');
        $stream->read(4096);
    }
StreamTest