Beispiel #1
0
 /**
  * Verify that the contents of the file can be iterated.
  */
 public function testIterateThroughTheFile()
 {
     $contents = file_get_contents(__FILE__);
     fwrite($this->stream, $contents);
     fseek($this->stream, 0);
     self::assertEquals($contents, join('', iterator_to_array($this->manager->iterate())), 'The file was not iterated properly.');
     fseek($this->stream, 0);
     self::assertEquals(substr($contents, 0, 10), join('', iterator_to_array($this->manager->iterate(10))), 'The file was not iterated properly.');
 }