Files
parsecsv-for-php/tests/properties/BaseClass.php
2018-02-02 17:31:26 +01:00

29 lines
627 B
PHP

<?php
class BaseClass extends PHPUnit\Framework\TestCase {
/**
* @access protected
* @var ParseCsvForPhp object
*/
protected $csv;
/**
* Setup
* Setup our test environment objects
*
* @access public
*/
public function setUp() {
$this->csv = new ParseCsvForPhp();
}
protected function _compareWithExpected($expected) {
$this->csv->auto(__DIR__ . '/../../examples/_books.csv');
$actual = array_map(function ($row) {
return $row['title'];
}, $this->csv->data);
$this->assertEquals($expected, $actual);
}
}