PhlyTest\Http\StreamTest::testSeekRaisesExceptionWhenStreamIsDetached PHP Method

testSeekRaisesExceptionWhenStreamIsDetached() public method

    public function testSeekRaisesExceptionWhenStreamIsDetached()
    {
        $this->tmpnam = tempnam(sys_get_temp_dir(), 'phly');
        file_put_contents($this->tmpnam, 'FOO BAR');
        $resource = fopen($this->tmpnam, 'wb+');
        $stream = new Stream($resource);
        $stream->detach();
        $this->setExpectedException('RuntimeException', 'No resource');
        $stream->seek(2);
    }
StreamTest