protected function _readLine() { if (!feof($this->fileHandle)) { $this->currentLine = trim(utf8_encode(fgets($this->fileHandle))); } else { $this->currentLine = null; } if ($this->currentLine != '') { $this->currentArray = Csv::parseString($this->currentLine, $this->separator); } else { $this->currentArray = null; } }
function testParseString_SomeQuotedStringFromExcel() { $array = Csv::parseString('One,Two words,"One ""quoted""","Single ""quote"'); $expected = array('One', 'Two words', 'One "quoted"', 'Single "quote'); $this->assertEqual($array, $expected); }