mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Merge pull request #146 from parsecsv/waiver-test
Added test for issue 145, couldn't reproduce it
This commit is contained in:
6
tests/example_files/waiver_field_separator.csv
Normal file
6
tests/example_files/waiver_field_separator.csv
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
keyword
|
||||||
|
liability waiver
|
||||||
|
release of liability form
|
||||||
|
release of liability
|
||||||
|
sample waiver
|
||||||
|
sample waiver form
|
||||||
|
@@ -246,4 +246,17 @@ class ParseTest extends TestCase {
|
|||||||
|
|
||||||
return $method->invokeArgs($object, $parameters);
|
return $method->invokeArgs($object, $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testWaiverFieldSeparator() {
|
||||||
|
$this->assertSame(false, $this->csv->auto(__DIR__ . '/../example_files/waiver_field_separator.csv'));
|
||||||
|
$expected = [
|
||||||
|
'liability waiver',
|
||||||
|
'release of liability form',
|
||||||
|
'release of liability',
|
||||||
|
'sample waiver',
|
||||||
|
'sample waiver form',
|
||||||
|
];
|
||||||
|
$actual = array_column($this->csv->data, 'keyword');
|
||||||
|
$this->assertSame($expected, $actual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user