Added possibility to autoselect the import format

This commit is contained in:
Jan Böhmer 2023-03-12 21:43:40 +01:00
parent 61e2dde400
commit 508641d1e8
6 changed files with 106 additions and 6 deletions

View file

@ -151,4 +151,24 @@ EOT;
$this->assertCount(2, $errors);
$this->assertSame('Node 1', $errors[0]['entity']->getName());
}
public function formatDataProvider(): array
{
return [
['csv', 'csv'],
['csv', 'CSV'],
['xml', 'Xml'],
['json', 'json'],
['yaml', 'yml'],
['yaml', 'YAML'],
];
}
/**
* @dataProvider formatDataProvider
*/
public function testDetermineFormat(string $expected, string $extension): void
{
$this->assertSame($expected, $this->service->determineFormat($extension));
}
}