mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
29 lines
627 B
PHP
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);
|
|
}
|
|
}
|