/** * Test write to file and the read from that file */ public function testIO() { $data = [1, 2, 'a']; $this->writer->printLine($data); $reader = new CsvReader($this->writer->getFilePath(), $this->separator); $line = $reader->getLine(); $this->assertEquals($data, $line); $this->assertNull($reader->getLine()); $reader->close(); }
/** * clean up after all tests */ protected function tearDown() { $this->reader->close(); }