Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@
use Flow\CLI\Command\{FileAnalyzeCommand};
use Flow\ETL\Tests\CommandOutputNormalizer;
use Flow\ETL\Tests\FlowTestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;

final class FileAnalyzeCommandTest extends FlowTestCase
{
use CommandOutputNormalizer;
public function test_read_rows_csv() : void
{
$application = new Application();
$application->add(new FileAnalyzeCommand());
$tester = new CommandTester($application->get('file:analyze'));
$tester = new CommandTester(new FileAnalyzeCommand('file:analyze'));

$tester->execute(['input-file' => __DIR__ . '/Fixtures/orders.csv', '--input-file-limit' => 5, '--stats-schema' => true, '--stats-columns' => true, '--schema-auto-cast' => true]);

Expand Down Expand Up @@ -72,9 +69,7 @@ public function test_read_rows_csv() : void

public function test_read_rows_csv_without_schema() : void
{
$application = new Application();
$application->add(new FileAnalyzeCommand());
$tester = new CommandTester($application->get('file:analyze'));
$tester = new CommandTester(new FileAnalyzeCommand('file:analyze'));

$tester->execute(['input-file' => __DIR__ . '/Fixtures/orders.csv', '--input-file-limit' => 5, '--stats-columns' => true, '--schema-auto-cast' => true]);

Expand Down