mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Slightly simplified getTotalDataRowCount, added test
The brackets () in the pattern were not needed, as only $matches[0] was accessed, not $matches[1]. The @var is useful for PhpStorm's Php Inspections (EA Extended). More details here: https://github.com/kalessil/phpinspectionsea/blob/master/docs/types-compatibility.md#foreach-source-to-iterate-over
This commit is contained in:
@@ -64,7 +64,6 @@ class DataRowCountTest extends TestCase {
|
||||
$this->assertEquals(3, $this->csv->getTotalDataRowCount());
|
||||
}
|
||||
|
||||
|
||||
public function testGetTotalRowCountSingleEnclosure() {
|
||||
$this->csv->heading = false;
|
||||
$this->csv->enclosure = "'";
|
||||
@@ -73,4 +72,11 @@ class DataRowCountTest extends TestCase {
|
||||
$this->assertEquals(3, $this->csv->getTotalDataRowCount());
|
||||
}
|
||||
|
||||
public function testGetTotalRowCountSingleRow() {
|
||||
$this->csv->heading = false;
|
||||
$this->csv->enclosure = "'";
|
||||
$sInput = "86545235689";
|
||||
$this->csv->load_data($sInput);
|
||||
$this->assertEquals(1, $this->csv->getTotalDataRowCount());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user