tests/CSVTest.php
/**
     * @testdox A CSV file can be loaded by filename, and read one line at a time. Row fields are read by column header.
     */
@testdox A CSV file can be loaded by filename, and read one line at a time. Row fields are read by column header.
@testdox A CSV file can be loaded by filename and read one line at a time . Row fields are read by column header .
public function basic()
    {
        $csv = new \Ormic\CSV($this->testFile);
        $csv->next();
        $this->assertEquals('One', $csv->get('H1'));
        $this->assertEquals('Two', $csv->get('H2'));
        $this->assertEquals('Three', $csv->get('Head Three'));
        $csv->next();
        $this->assertEquals('Four', $csv->get('H1'));
        $this->assertEquals('Five', $csv->get('H2'));
        $this->assertEquals('Six', $csv->get('Head Three'));
    }
public function basic ( ) { $ csv = new \ Ormic \ CSV ( $ this -> testFile ) ; $ csv -> next ( ) ; $ this -> assertEquals ( 'One' , $ csv -> get ( 'H1' ) ) ; $ this -> assertEquals ( 'Two' , $ csv -> get ( 'H2' ) ) ; $ this -> assertEquals ( 'Three' , $ csv -> get ( 'Head Three' ) ) ; $ csv -> next ( ) ; $ this -> assertEquals ( 'Four' , $ csv -> get ( 'H1' ) ) ; $ this -> assertEquals ( 'Five' , $ csv -> get ( 'H2' ) ) ; $ this -> assertEquals ( 'Six' , $ csv -> get ( 'Head Three' ) ) ; }
@testdox A CSV file can be loaded by filename, and read one line at a time.
@testdox A CSV file can be loaded by filename and read one line at a time .