test for method getDatatypes added

This commit is contained in:
Susann Sgorzaly
2018-02-17 22:24:50 +01:00
parent f8c68a6cd7
commit 0e5afb209e
2 changed files with 23 additions and 0 deletions

View File

@@ -128,6 +128,24 @@ class ParseTest extends PHPUnit\Framework\TestCase {
], $aCity);
}
/**
* @depends testSepRowAutoDetection
*/
public function testGetColumnDatatypes() {
$this->csv->auto('tests/methods/fixtures/datatype.csv');
$this->csv->getDatatypes();
$expected = [
'title' => 'string',
'isbn' => 'string',
'publishedAt' => 'date',
'published' => 'boolean',
'count' => 'integer',
'price' => 'float'
];
$this->assertEquals($expected, $this->csv->data_types);
}
protected function _get_magazines_data() {
return [
[