Merge remote-tracking branch 'origin/Tests-for-sort-and-cond' into pull-test

# Conflicts:
#	tests/Bootstrap.php
#	tests/methods/ParseTest.php
#	tests/properties/worthless_test.php
This commit is contained in:
Christian Bläul
2018-02-21 18:41:45 +01:00
4 changed files with 141 additions and 5 deletions

View File

@@ -178,10 +178,10 @@ class ParseTest extends TestCase
}
public function autoQuotesDataProvider() {
return [
'double-enclosure' => ['tests/methods/fixtures/auto-double-enclosure.csv', '"'],
'single-enclosure' => ['tests/methods/fixtures/auto-single-enclosure.csv', "'"],
];
return array(
array('auto-double-enclosure.csv', '"'),
array('auto-single-enclosure.csv', "'"),
);
}
/**
@@ -194,7 +194,7 @@ class ParseTest extends TestCase
*/
public function testAutoQuotes($file, $enclosure) {
$csv = new Csv();
$csv->auto($file, true, null, null, $enclosure);
$csv->auto(__DIR__ . '/fixtures/' . $file, true, null, null, $enclosure);
$this->assertArrayHasKey('column1', $csv->data[0], 'Data parsed incorrectly with enclosure ' . $enclosure);
$this->assertEquals('value1', $csv->data[0]['column1'], 'Data parsed incorrectly with enclosure ' . $enclosure);
}