mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
- https://svn.apache.org/repos/asf/shindig/attic/php/docs/style-guide.html: "Acryonyms are treated as normal words." - https://softwareengineering.stackexchange.com/a/149321/80632 Overview of class naming conventions of PHP frameworks - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md No .lib allowed: "The class name corresponds to a file name ending in .php" See issue #50
32 lines
665 B
PHP
32 lines
665 B
PHP
<?php
|
|
|
|
class BaseClass extends PHPUnit\Framework\TestCase {
|
|
|
|
/**
|
|
* CSV
|
|
* The parseCSV object
|
|
*
|
|
* @access protected
|
|
* @var ParseCsvForPhp
|
|
*/
|
|
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);
|
|
}
|
|
}
|