Skip to content

Commit

Permalink
Add check-syntax option to CreateSchemaTest (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Apr 19, 2024
1 parent e2b681b commit a9b1d50
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions tests/Commands/CreateSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ final class CreateSchemaTest extends TestCase
public function testWithoutHeader(): void
{
[$actual, $exitCode] = Tools::virtualExecution('create-schema', [
'csv' => './tests/fixtures/demo.csv',
'header' => 'no',
'csv' => './tests/fixtures/demo.csv',
'header' => 'no',
'check-syntax' => null,
]);

$expected = <<<'YAML'
Expand Down Expand Up @@ -131,8 +132,9 @@ public function testWithoutHeader(): void
public function testWithHeader(): void
{
[$actual, $exitCode] = Tools::virtualExecution('create-schema', [
'csv' => './tests/fixtures/demo.csv',
'header' => 'true',
'csv' => './tests/fixtures/demo.csv',
'header' => 'true',
'check-syntax' => null,
]);

$expected = <<<'YAML'
Expand Down Expand Up @@ -275,8 +277,9 @@ public function testWithHeader(): void
public function testWithHeaderComplex(): void
{
[$actual, $exitCode] = Tools::virtualExecution('create-schema', [
'csv' => './tests/fixtures/complex_header.csv',
'header' => 'true',
'csv' => './tests/fixtures/complex_header.csv',
'header' => 'true',
'check-syntax' => null,
]);

$expected = <<<'YAML'
Expand Down Expand Up @@ -654,8 +657,9 @@ public function testWithHeaderComplex(): void
public function testBigComplex(): void
{
[$actual, $exitCode] = Tools::virtualExecution('create-schema', [
'csv' => './tests/fixtures/big_header.csv',
'header' => 'true',
'csv' => './tests/fixtures/big_header.csv',
'header' => 'true',
'check-syntax' => null,
]);

$expected = <<<'YAML'
Expand Down Expand Up @@ -1773,9 +1777,10 @@ public function testBigComplex(): void
public function testWithHeaderOneLine(): void
{
[$actual, $exitCode] = Tools::virtualExecution('create-schema', [
'csv' => './tests/fixtures/demo.csv',
'header' => 'true',
'lines' => 1,
'csv' => './tests/fixtures/demo.csv',
'header' => 'true',
'lines' => 1,
'check-syntax' => null,
]);

$expected = <<<'YAML'
Expand Down

0 comments on commit a9b1d50

Please sign in to comment.