Skip to content

Commit

Permalink
ArrayInput
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Riki Popeliš committed Jul 19, 2024
1 parent fe0f0ae commit a6e146a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 92 deletions.
9 changes: 5 additions & 4 deletions tests/Command/BaseCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

use Phoenix\Config\Parser\PhpConfigParser;
use Phoenix\Tests\Helpers\Adapter\CleanupInterface;
use Phoenix\Tests\Mock\Command\Input;
use Phoenix\Tests\Mock\Command\Output;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Finder\Finder;

abstract class BaseCommandTest extends TestCase
{
protected Input $input;
protected InputInterface $input;

protected Output $output;

Expand Down Expand Up @@ -48,9 +49,9 @@ protected function setUp(): void
$this->output = new Output();
}

protected function createInput(): Input
protected function createInput(): InputInterface
{
$input = new Input();
$input = new ArrayInput([]);
$input->setOption('environment', $this->getEnvironment());
return $input;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Command/DiffCommand/DiffCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
use Phoenix\Exception\PhoenixException;
use Phoenix\Migration\ClassNameCreator;
use Phoenix\Tests\Command\BaseCommandTest;
use Phoenix\Tests\Mock\Command\Input;
use Phoenix\Tests\Mock\Command\Output;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\Finder\Finder;
Expand Down Expand Up @@ -326,7 +326,7 @@ public function testDiffCommandJsonOutputAfterMigration(): void
$this->assertArrayHasKey('execution_time', $message);
}

protected function createInput(): Input
protected function createInput(): InputInterface
{
$input = parent::createInput();
$input->setOption('source', $this->getEnvironment());
Expand Down
86 changes: 0 additions & 86 deletions tests/Mock/Command/Input.php

This file was deleted.

0 comments on commit a6e146a

Please sign in to comment.