tests/CSVTest.php
/**
     * @testdox If two headers map to the same 'slug', the right-most one is used.
     */
@testdox If two headers map to the same 'slug', the right-most one is used.
@testdox If two headers map to the same ' slug ' the right - most one is used .
public function multiple()
    {
        $csvText = "Head One,H2,head one\nOne,Two,Three\nFour,Five,Six";
        file_put_contents($this->testFile, $csvText);
        $csv = new \Ormic\CSV($this->testFile);
        $csv->next();
        $this->assertEquals('Three', $csv->get('Head One'));
        $csv->next();
        $this->assertEquals('Six', $csv->get('head one'));
    }
public function multiple ( ) { $ csvText = " Head One,H2,head one \n One,Two,Three \n Four,Five,Six " ; file_put_contents ( $ this -> testFile , $ csvText ) ; $ csv = new \ Ormic \ CSV ( $ this -> testFile ) ; $ csv -> next ( ) ; $ this -> assertEquals ( 'Three' , $ csv -> get ( 'Head One' ) ) ; $ csv -> next ( ) ; $ this -> assertEquals ( 'Six' , $ csv -> get ( 'head one' ) ) ; }
@testdox If two headers map to the same 'slug', the right-most one is used.
@testdox If two headers map to the same ' slug ' the right - most one is used .
// Set up CSV. // Test.