Example #1
0
 /**
  * Test do not skip empty lines (default behaviour)
  */
 public function testDoNotSkipEmptyLines()
 {
     $i = 0;
     while (($line = $this->reader->getLine()) !== null) {
         ++$i;
     }
     $this->assertEquals(5, $i);
     $this->assertEquals(5, $this->reader->getLineNumber());
 }
Example #2
0
 /**
  * Test write to file and the read from that file
  */
 public function testIO()
 {
     $text = "a Text";
     $this->writer->printLine($text);
     $reader = new Reader($this->writer->getFilePath());
     $line = $reader->getLine();
     $this->assertEquals($text, $line);
     $this->assertNull($reader->getLine());
     $reader->close();
 }