Exemplo n.º 1
0
 public function testCheckingEOF()
 {
     $file = new File('/file');
     $handler = new FileHandler();
     $handler->setFile($file);
     $this->assertTrue($handler->atEof());
     $file->setData('1');
     $this->assertFalse($handler->atEof());
     $handler->position(1);
     $this->assertTrue($handler->atEof());
     $handler->position(2);
     $this->assertTrue($handler->atEof());
 }
Exemplo n.º 2
0
 /**
  * Checks whether pointer has reached EOF.
  *
  * @see http://php.net/streamwrapper.stream-eof
  *
  * @return bool
  */
 public function stream_eof()
 {
     return $this->currently_opened->atEof();
 }