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()); }
/** * Checks whether pointer has reached EOF. * * @see http://php.net/streamwrapper.stream-eof * * @return bool */ public function stream_eof() { return $this->currently_opened->atEof(); }