/** * Test the fetch method with the File::CUSTOM mode * @test */ public function fetchCustom() { $file = new File($this->getCSVFile(), 0); $file->setMappingMode(File::CUSTOM); $file->setMapping(array('ID', 'First Name', 'Age')); $row = $file->fetch(); $this->assertEquals('John', $row['First Name']); }