tests/unit/Subjects/AbstractSubjectTest.php
/**
     * Test the importRow() method with the header line.
     *
     * @return void
     */
Test the importRow() method with the header line.
@return void
Test the importRow () method with the header line . @return void
public function testImportHeaderRow()
    {
        $filename = 'var/importexport/product-import_20170706-160000_01.csv';
        $this->abstractSubject->setFilename($filename);
        $this->abstractSubject->importRow(array(0 => 'col1', 1 => 'col2'));
        $this->assertSame(array('col1' => 0, 'col2' => 1), $this->abstractSubject->getHeaders());
    }
public function testImportHeaderRow ( ) { $ filename = 'var/importexport/product-import_20170706-160000_01.csv' ; $ this -> abstractSubject -> setFilename ( $ filename ) ; $ this -> abstractSubject -> importRow ( array ( 0 => 'col1' , 1 => 'col2' ) ) ; $ this -> assertSame ( array ( 'col1' => 0 , 'col2' => 1 ) , $ this -> abstractSubject -> getHeaders ( ) ) ; }
Test the importRow() method with the header line.
Test the importRow () method with the header line .
// set the filename // set filename and headers // start importing the row // query whether or not the headers have been initialized