Exemplo n.º 1
0
 public function testEofReportsTrueWhenStreamIsDetached()
 {
     $this->tmpnam = tempnam(sys_get_temp_dir(), 'diac');
     file_put_contents($this->tmpnam, 'FOO BAR');
     $resource = fopen($this->tmpnam, 'wb+');
     $stream = new Stream($resource);
     fseek($resource, 2);
     $stream->detach();
     $this->assertTrue($stream->eof());
 }