diff --git a/src/Console/Application.php b/src/Console/Application.php index f3aee842c..42f38d465 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -15,19 +15,19 @@ namespace KevinGH\Box\Console; use Fidry\Console\Application\Application as FidryApplication; -use KevinGH\Box\Console\Command\Check\Signature as CheckSignature; -use KevinGH\Box\Console\Command\Compile; -use KevinGH\Box\Console\Command\Composer\ComposerCheckVersion; -use KevinGH\Box\Console\Command\Composer\ComposerVendorDir; -use KevinGH\Box\Console\Command\Diff; -use KevinGH\Box\Console\Command\Extract; -use KevinGH\Box\Console\Command\GenerateDockerFile; -use KevinGH\Box\Console\Command\Info; -use KevinGH\Box\Console\Command\Info\Signature as InfoSignature; -use KevinGH\Box\Console\Command\Namespace_; -use KevinGH\Box\Console\Command\Process; -use KevinGH\Box\Console\Command\Validate; -use KevinGH\Box\Console\Command\Verify; +use KevinGH\Box\Console\Command\Check\CheckSignatureCommand as CheckSignature; +use KevinGH\Box\Console\Command\CompileCommand; +use KevinGH\Box\Console\Command\Composer\ComposerCheckVersionCommand; +use KevinGH\Box\Console\Command\Composer\ComposerVendorDirCommand; +use KevinGH\Box\Console\Command\DiffCommand; +use KevinGH\Box\Console\Command\ExtractCommand; +use KevinGH\Box\Console\Command\GenerateDockerFileCommand; +use KevinGH\Box\Console\Command\Info\InfoSignatureCommand as InfoSignature; +use KevinGH\Box\Console\Command\InfoCommand; +use KevinGH\Box\Console\Command\NamespaceCommand; +use KevinGH\Box\Console\Command\ProcessCommand; +use KevinGH\Box\Console\Command\ValidateCommand; +use KevinGH\Box\Console\Command\VerifyCommand; use KevinGH\Box\RequirementChecker\AppRequirementsFactory; use KevinGH\Box\RequirementChecker\RequirementsDumper; use function KevinGH\Box\get_box_version; @@ -93,25 +93,25 @@ public function getHeader(): string public function getCommands(): array { return [ - new ComposerCheckVersion(), - new ComposerVendorDir(), - new Compile( + new ComposerCheckVersionCommand(), + new ComposerVendorDirCommand(), + new CompileCommand( $this->getHeader(), new RequirementsDumper( new AppRequirementsFactory(), ), ), - new Diff(), - new Info(), - new Info('info:general'), + new DiffCommand(), + new InfoCommand(), + new InfoCommand('info:general'), new InfoSignature(), new CheckSignature(), - new Process(), - new Extract(), - new Validate(), - new Verify(), - new GenerateDockerFile(), - new Namespace_(), + new ProcessCommand(), + new ExtractCommand(), + new ValidateCommand(), + new VerifyCommand(), + new GenerateDockerFileCommand(), + new NamespaceCommand(), ]; } diff --git a/src/Console/Command/Check/Signature.php b/src/Console/Command/Check/CheckSignatureCommand.php similarity index 97% rename from src/Console/Command/Check/Signature.php rename to src/Console/Command/Check/CheckSignatureCommand.php index 3bbbfab0f..8b2efb258 100644 --- a/src/Console/Command/Check/Signature.php +++ b/src/Console/Command/Check/CheckSignatureCommand.php @@ -26,7 +26,7 @@ /** * @private */ -final class Signature implements Command +final class CheckSignatureCommand implements Command { private const PHAR_ARG = 'phar'; private const HASH = 'hash'; diff --git a/src/Console/Command/Compile.php b/src/Console/Command/CompileCommand.php similarity index 99% rename from src/Console/Command/Compile.php rename to src/Console/Command/CompileCommand.php index 6c8b05e6a..58d25dc3d 100644 --- a/src/Console/Command/Compile.php +++ b/src/Console/Command/CompileCommand.php @@ -76,7 +76,7 @@ /** * @private */ -final class Compile implements CommandAware +final class CompileCommand implements CommandAware { use CommandAwareness; @@ -997,6 +997,6 @@ private function generateDockerFile(IO $io): int private function getDockerCommand(): Command { - return $this->getCommandRegistry()->findCommand(GenerateDockerFile::NAME); + return $this->getCommandRegistry()->findCommand(GenerateDockerFileCommand::NAME); } } diff --git a/src/Console/Command/Composer/ComposerCheckVersion.php b/src/Console/Command/Composer/ComposerCheckVersionCommand.php similarity index 95% rename from src/Console/Command/Composer/ComposerCheckVersion.php rename to src/Console/Command/Composer/ComposerCheckVersionCommand.php index 30fe5e1e0..227984b7b 100644 --- a/src/Console/Command/Composer/ComposerCheckVersion.php +++ b/src/Console/Command/Composer/ComposerCheckVersionCommand.php @@ -22,7 +22,7 @@ /** * @private */ -final class ComposerCheckVersion extends ComposerCommand +final class ComposerCheckVersionCommand extends ComposerCommand { public function getConfiguration(): Configuration { diff --git a/src/Console/Command/Composer/ComposerVendorDir.php b/src/Console/Command/Composer/ComposerVendorDirCommand.php similarity index 95% rename from src/Console/Command/Composer/ComposerVendorDir.php rename to src/Console/Command/Composer/ComposerVendorDirCommand.php index d070cbb02..ae8f4853c 100644 --- a/src/Console/Command/Composer/ComposerVendorDir.php +++ b/src/Console/Command/Composer/ComposerVendorDirCommand.php @@ -22,7 +22,7 @@ /** * @private */ -final class ComposerVendorDir extends ComposerCommand +final class ComposerVendorDirCommand extends ComposerCommand { public function getConfiguration(): Configuration { diff --git a/src/Console/Command/Diff.php b/src/Console/Command/DiffCommand.php similarity index 99% rename from src/Console/Command/Diff.php rename to src/Console/Command/DiffCommand.php index fc8c2596e..6185c1702 100644 --- a/src/Console/Command/Diff.php +++ b/src/Console/Command/DiffCommand.php @@ -40,7 +40,7 @@ /** * @private */ -final class Diff implements Command +final class DiffCommand implements Command { private const FIRST_PHAR_ARG = 'pharA'; private const SECOND_PHAR_ARG = 'pharB'; diff --git a/src/Console/Command/Extract.php b/src/Console/Command/ExtractCommand.php similarity index 99% rename from src/Console/Command/Extract.php rename to src/Console/Command/ExtractCommand.php index a5c58c345..5806d335d 100644 --- a/src/Console/Command/Extract.php +++ b/src/Console/Command/ExtractCommand.php @@ -36,7 +36,7 @@ /** * @private */ -final class Extract implements Command +final class ExtractCommand implements Command { public const STUB_PATH = '.phar/stub.php'; public const PHAR_META_PATH = '.phar/meta.json'; diff --git a/src/Console/Command/GenerateDockerFile.php b/src/Console/Command/GenerateDockerFileCommand.php similarity index 96% rename from src/Console/Command/GenerateDockerFile.php rename to src/Console/Command/GenerateDockerFileCommand.php index 58a64cd9b..4d0ce4b73 100644 --- a/src/Console/Command/GenerateDockerFile.php +++ b/src/Console/Command/GenerateDockerFileCommand.php @@ -35,7 +35,7 @@ /** * @private */ -final class GenerateDockerFile implements CommandAware +final class GenerateDockerFileCommand implements CommandAware { use CommandAwareness; @@ -144,10 +144,10 @@ private function guessPharPath(IO $io): ?string return $config->getOutputPath(); } - private function getCompileCommand(): Compile + private function getCompileCommand(): CompileCommand { /* @noinspection PhpIncompatibleReturnTypeInspection */ - return $this->getCommandRegistry()->findCommand(Compile::NAME); + return $this->getCommandRegistry()->findCommand(CompileCommand::NAME); } private static function createCompileInput(IO $io): InputInterface diff --git a/src/Console/Command/Info/Signature.php b/src/Console/Command/Info/InfoSignatureCommand.php similarity index 97% rename from src/Console/Command/Info/Signature.php rename to src/Console/Command/Info/InfoSignatureCommand.php index d4f2ed920..49d790110 100644 --- a/src/Console/Command/Info/Signature.php +++ b/src/Console/Command/Info/InfoSignatureCommand.php @@ -26,7 +26,7 @@ /** * @private */ -final class Signature implements Command +final class InfoSignatureCommand implements Command { private const PHAR_ARG = 'phar'; diff --git a/src/Console/Command/Info.php b/src/Console/Command/InfoCommand.php similarity index 99% rename from src/Console/Command/Info.php rename to src/Console/Command/InfoCommand.php index 43e9c70c2..81ecf6286 100644 --- a/src/Console/Command/Info.php +++ b/src/Console/Command/InfoCommand.php @@ -32,7 +32,7 @@ /** * @private */ -final readonly class Info implements Command +final readonly class InfoCommand implements Command { private const PHAR_ARG = 'phar'; private const LIST_OPT = 'list'; diff --git a/src/Console/Command/Namespace_.php b/src/Console/Command/NamespaceCommand.php similarity index 95% rename from src/Console/Command/Namespace_.php rename to src/Console/Command/NamespaceCommand.php index e019478b3..9b7314b39 100644 --- a/src/Console/Command/Namespace_.php +++ b/src/Console/Command/NamespaceCommand.php @@ -21,7 +21,7 @@ use function current; use function explode; -final class Namespace_ implements Command +final class NamespaceCommand implements Command { public function getConfiguration(): Configuration { diff --git a/src/Console/Command/Process.php b/src/Console/Command/ProcessCommand.php similarity index 99% rename from src/Console/Command/Process.php rename to src/Console/Command/ProcessCommand.php index ca35b214c..231a35289 100644 --- a/src/Console/Command/Process.php +++ b/src/Console/Command/ProcessCommand.php @@ -44,7 +44,7 @@ use function sprintf; // TODO: replace the PHP-Scoper compactor in order to warn the user about scoping errors -final class Process implements Command +final class ProcessCommand implements Command { private const FILE_ARGUMENT = 'file'; diff --git a/src/Console/Command/Validate.php b/src/Console/Command/ValidateCommand.php similarity index 99% rename from src/Console/Command/Validate.php rename to src/Console/Command/ValidateCommand.php index ba6a1654a..dfa5df073 100644 --- a/src/Console/Command/Validate.php +++ b/src/Console/Command/ValidateCommand.php @@ -34,7 +34,7 @@ /** * @private */ -final class Validate implements Command +final class ValidateCommand implements Command { private const FILE_ARGUMENT = 'file'; private const IGNORE_MESSAGES_OPTION = 'ignore-recommendations-and-warnings'; diff --git a/src/Console/Command/Verify.php b/src/Console/Command/VerifyCommand.php similarity index 98% rename from src/Console/Command/Verify.php rename to src/Console/Command/VerifyCommand.php index 346872e9c..45d864ed4 100644 --- a/src/Console/Command/Verify.php +++ b/src/Console/Command/VerifyCommand.php @@ -29,7 +29,7 @@ /** * @private */ -final class Verify implements Command +final class VerifyCommand implements Command { private const PHAR_ARG = 'phar'; diff --git a/src/Phar/Differ/DifferFactory.php b/src/Phar/Differ/DifferFactory.php index aeeeffe45..cfe3dadfd 100644 --- a/src/Phar/Differ/DifferFactory.php +++ b/src/Phar/Differ/DifferFactory.php @@ -14,7 +14,7 @@ namespace KevinGH\Box\Phar\Differ; -use KevinGH\Box\Console\Command\Extract; +use KevinGH\Box\Console\Command\ExtractCommand; use KevinGH\Box\Phar\DiffMode; final class DifferFactory @@ -26,7 +26,7 @@ public function create( return match ($mode) { DiffMode::FILE_NAME => new FilenameDiffer(), DiffMode::GIT => new GitDiffer(), - DiffMode::GNU => new ProcessCommandBasedDiffer('diff --exclude='.Extract::PHAR_META_PATH), + DiffMode::GNU => new ProcessCommandBasedDiffer('diff --exclude='.ExtractCommand::PHAR_META_PATH), DiffMode::CHECKSUM => new ChecksumDiffer($checksumAlgorithm), }; } diff --git a/src/Phar/Differ/GitDiffer.php b/src/Phar/Differ/GitDiffer.php index 5e2302fa7..2ccbc1378 100644 --- a/src/Phar/Differ/GitDiffer.php +++ b/src/Phar/Differ/GitDiffer.php @@ -15,7 +15,7 @@ namespace KevinGH\Box\Phar\Differ; use Fidry\Console\IO; -use KevinGH\Box\Console\Command\Extract; +use KevinGH\Box\Console\Command\ExtractCommand; use KevinGH\Box\Phar\PharInfo; use function array_filter; use function explode; @@ -48,7 +48,7 @@ public function diff(PharInfo $pharInfoA, PharInfo $pharInfoB, IO $io): void $pharMetaLine = sprintf( 'a%2$s/%1$s b%3$s/%1$s', - Extract::PHAR_META_PATH, + ExtractCommand::PHAR_META_PATH, $pharInfoA->getFileName(), $pharInfoB->getFileName(), ); diff --git a/src/Phar/PharInfo.php b/src/Phar/PharInfo.php index 184f1deab..29b7cda78 100644 --- a/src/Phar/PharInfo.php +++ b/src/Phar/PharInfo.php @@ -44,7 +44,7 @@ namespace KevinGH\Box\Phar; use Fidry\FileSystem\FS; -use KevinGH\Box\Console\Command\Extract; +use KevinGH\Box\Console\Command\ExtractCommand; use KevinGH\Box\ExecutableFinder; use KevinGH\Box\Phar\Throwable\InvalidPhar; use KevinGH\Box\RequirementChecker\Requirement; @@ -257,7 +257,7 @@ public function getSignature(): ?array public function getStubPath(): string { - return Extract::STUB_PATH; + return ExtractCommand::STUB_PATH; } public function getStubContent(): ?string @@ -366,8 +366,8 @@ private static function loadDumpedPharFiles(string $tmp): array ), ); - $meta = PharMeta::fromJson(FS::getFileContents($tmp.DIRECTORY_SEPARATOR.Extract::PHAR_META_PATH)); - unset($dumpedFiles[Extract::PHAR_META_PATH]); + $meta = PharMeta::fromJson(FS::getFileContents($tmp.DIRECTORY_SEPARATOR.ExtractCommand::PHAR_META_PATH)); + unset($dumpedFiles[ExtractCommand::PHAR_META_PATH]); return [$meta, $dumpedFiles]; } diff --git a/tests/Console/Command/Check/SignatureTest.php b/tests/Console/Command/Check/SignatureCommandTest.php similarity index 96% rename from tests/Console/Command/Check/SignatureTest.php rename to tests/Console/Command/Check/SignatureCommandTest.php index 4bef06ddd..d6755dfc9 100644 --- a/tests/Console/Command/Check/SignatureTest.php +++ b/tests/Console/Command/Check/SignatureCommandTest.php @@ -26,14 +26,14 @@ /** * @internal */ -#[CoversClass(Signature::class)] -class SignatureTest extends CommandTestCase +#[CoversClass(CheckSignatureCommand::class)] +class SignatureCommandTest extends CommandTestCase { private const FIXTURES = __DIR__.'/../../../../fixtures/phar'; protected function getCommand(): Command { - return new Signature(); + return new CheckSignatureCommand(); } public function test_it_checks_the_phar_signature(): void diff --git a/tests/Console/Command/CompileTest.php b/tests/Console/Command/CompileCommandTest.php similarity index 99% rename from tests/Console/Command/CompileTest.php rename to tests/Console/Command/CompileCommandTest.php index c603dbeef..81d734a11 100644 --- a/tests/Console/Command/CompileTest.php +++ b/tests/Console/Command/CompileCommandTest.php @@ -75,10 +75,10 @@ /** * @internal */ -#[CoversClass(Compile::class)] +#[CoversClass(CompileCommand::class)] #[CoversClass(MessageRenderer::class)] #[RunTestsInSeparateProcesses] -class CompileTest extends FileSystemTestCase +class CompileCommandTest extends FileSystemTestCase { use RequiresPharReadonlyOff; @@ -161,7 +161,7 @@ protected function setUp(): void $application = new SymfonyApplication(); $application->add($command); - $application->add(new SymfonyCommand(new GenerateDockerFile())); + $application->add(new SymfonyCommand(new GenerateDockerFileCommand())); $this->commandTester = new CommandTester( $application->get( @@ -181,7 +181,7 @@ protected function tearDown(): void protected function getCommand(): Command { - return new Compile( + return new CompileCommand( (new Application())->getHeader(), new RequirementsDumper( new AppRequirementsFactory(), diff --git a/tests/Console/Command/Composer/ComposerCheckVersionTest.php b/tests/Console/Command/Composer/ComposerCheckVersionCommandTest.php similarity index 96% rename from tests/Console/Command/Composer/ComposerCheckVersionTest.php rename to tests/Console/Command/Composer/ComposerCheckVersionCommandTest.php index 405bdff81..d0f24c021 100644 --- a/tests/Console/Command/Composer/ComposerCheckVersionTest.php +++ b/tests/Console/Command/Composer/ComposerCheckVersionCommandTest.php @@ -30,15 +30,15 @@ /** * @internal */ -#[CoversClass(ComposerCheckVersion::class)] -class ComposerCheckVersionTest extends TestCase +#[CoversClass(ComposerCheckVersionCommand::class)] +class ComposerCheckVersionCommandTest extends TestCase { private CommandTester $commandTester; private string $cwd; protected function setUp(): void { - $this->commandTester = CommandTester::fromConsoleCommand(new ComposerCheckVersion()); + $this->commandTester = CommandTester::fromConsoleCommand(new ComposerCheckVersionCommand()); $this->cwd = getcwd(); chdir(__DIR__); diff --git a/tests/Console/Command/Composer/ComposerVendorDirTest.php b/tests/Console/Command/Composer/ComposerVendorDirCommandTest.php similarity index 95% rename from tests/Console/Command/Composer/ComposerVendorDirTest.php rename to tests/Console/Command/Composer/ComposerVendorDirCommandTest.php index f6d8a1cd4..922f7455e 100644 --- a/tests/Console/Command/Composer/ComposerVendorDirTest.php +++ b/tests/Console/Command/Composer/ComposerVendorDirCommandTest.php @@ -28,15 +28,15 @@ /** * @internal */ -#[CoversClass(ComposerVendorDir::class)] -class ComposerVendorDirTest extends TestCase +#[CoversClass(ComposerVendorDirCommand::class)] +class ComposerVendorDirCommandTest extends TestCase { private CommandTester $commandTester; private string $cwd; protected function setUp(): void { - $this->commandTester = CommandTester::fromConsoleCommand(new ComposerVendorDir()); + $this->commandTester = CommandTester::fromConsoleCommand(new ComposerVendorDirCommand()); $this->cwd = getcwd(); chdir(__DIR__); diff --git a/tests/Console/Command/DiffTest.php b/tests/Console/Command/DiffCommandTest.php similarity index 99% rename from tests/Console/Command/DiffTest.php rename to tests/Console/Command/DiffCommandTest.php index 0fa653f72..f5cc83267 100644 --- a/tests/Console/Command/DiffTest.php +++ b/tests/Console/Command/DiffCommandTest.php @@ -31,8 +31,8 @@ /** * @internal */ -#[CoversClass(Diff::class)] -class DiffTest extends CommandTestCase +#[CoversClass(DiffCommand::class)] +class DiffCommandTest extends CommandTestCase { use RequiresPharReadonlyOff; @@ -47,7 +47,7 @@ protected function setUp(): void protected function getCommand(): Command { - return new Diff(); + return new DiffCommand(); } #[DataProvider('diffPharsProvider')] diff --git a/tests/Console/Command/ExtractTest.php b/tests/Console/Command/ExtractCommandTest.php similarity index 98% rename from tests/Console/Command/ExtractTest.php rename to tests/Console/Command/ExtractCommandTest.php index bb69f3040..be28cbce8 100644 --- a/tests/Console/Command/ExtractTest.php +++ b/tests/Console/Command/ExtractCommandTest.php @@ -33,15 +33,15 @@ /** * @internal */ -#[CoversClass(Extract::class)] +#[CoversClass(ExtractCommand::class)] #[RunTestsInSeparateProcesses] -class ExtractTest extends CommandTestCase +class ExtractCommandTest extends CommandTestCase { private const FIXTURES_DIR = __DIR__.'/../../../fixtures/extract'; protected function getCommand(): Command { - return new Extract(); + return new ExtractCommand(); } #[DataProvider('pharProvider')] diff --git a/tests/Console/Command/GenerateDockerFileTest.php b/tests/Console/Command/GenerateDockerFileCommandTest.php similarity index 95% rename from tests/Console/Command/GenerateDockerFileTest.php rename to tests/Console/Command/GenerateDockerFileCommandTest.php index 68cab04b9..5eff52591 100644 --- a/tests/Console/Command/GenerateDockerFileTest.php +++ b/tests/Console/Command/GenerateDockerFileCommandTest.php @@ -25,8 +25,8 @@ /** * @internal */ -#[CoversClass(GenerateDockerFile::class)] -class GenerateDockerFileTest extends CommandTestCase +#[CoversClass(GenerateDockerFileCommand::class)] +class GenerateDockerFileCommandTest extends CommandTestCase { use RequiresPharReadonlyOff; @@ -41,7 +41,7 @@ protected function setUp(): void protected function getCommand(): Command { - return new GenerateDockerFile(); + return new GenerateDockerFileCommand(); } public function test_it_generates_a_dockerfile_for_a_given_phar(): void diff --git a/tests/Console/Command/Info/SignatureTest.php b/tests/Console/Command/Info/SignatureCommandTest.php similarity index 95% rename from tests/Console/Command/Info/SignatureTest.php rename to tests/Console/Command/Info/SignatureCommandTest.php index d0aa46194..b0dbf1b24 100644 --- a/tests/Console/Command/Info/SignatureTest.php +++ b/tests/Console/Command/Info/SignatureCommandTest.php @@ -26,14 +26,14 @@ /** * @internal */ -#[CoversClass(Signature::class)] -class SignatureTest extends CommandTestCase +#[CoversClass(InfoSignatureCommand::class)] +class SignatureCommandTest extends CommandTestCase { private const FIXTURES = __DIR__.'/../../../../fixtures/phar'; protected function getCommand(): Command { - return new Signature(); + return new InfoSignatureCommand(); } public function test_it_provides_the_phar_signature(): void diff --git a/tests/Console/Command/InfoTest.php b/tests/Console/Command/InfoCommandTest.php similarity index 99% rename from tests/Console/Command/InfoTest.php rename to tests/Console/Command/InfoCommandTest.php index 57583bb5d..49a7e2086 100644 --- a/tests/Console/Command/InfoTest.php +++ b/tests/Console/Command/InfoCommandTest.php @@ -31,9 +31,9 @@ /** * @internal */ -#[CoversClass(Info::class)] +#[CoversClass(InfoCommand::class)] #[CoversClass(PharInfoRenderer::class)] -class InfoTest extends CommandTestCase +class InfoCommandTest extends CommandTestCase { private const FIXTURES = __DIR__.'/../../../fixtures/info'; @@ -48,7 +48,7 @@ protected function setUp(): void protected function getCommand(): Command { - return new Info(); + return new InfoCommand(); } #[DataProvider('inputProvider')] diff --git a/tests/Console/Command/Namespace_Test.php b/tests/Console/Command/NamespaceCommandTest.php similarity index 87% rename from tests/Console/Command/Namespace_Test.php rename to tests/Console/Command/NamespaceCommandTest.php index 5d758ece9..ca5b748f0 100644 --- a/tests/Console/Command/Namespace_Test.php +++ b/tests/Console/Command/NamespaceCommandTest.php @@ -23,12 +23,12 @@ /** * @internal */ -#[CoversClass(Namespace_::class)] -class Namespace_Test extends CommandTestCase +#[CoversClass(NamespaceCommand::class)] +class NamespaceCommandTest extends CommandTestCase { protected function getCommand(): Command { - return new Namespace_(); + return new NamespaceCommand(); } public function test_it_show_the_ng(): void diff --git a/tests/Console/Command/ProcessTest.php b/tests/Console/Command/ProcessCommandTest.php similarity index 98% rename from tests/Console/Command/ProcessTest.php rename to tests/Console/Command/ProcessCommandTest.php index 6d2a0668f..a74f57861 100644 --- a/tests/Console/Command/ProcessTest.php +++ b/tests/Console/Command/ProcessCommandTest.php @@ -25,12 +25,12 @@ /** * @internal */ -#[CoversClass(Process::class)] -class ProcessTest extends CommandTestCase +#[CoversClass(ProcessCommand::class)] +class ProcessCommandTest extends CommandTestCase { protected function getCommand(): Command { - return new Process(); + return new ProcessCommand(); } public function test_it_processes_a_file_and_displays_the_processed_contents_with_no_config(): void diff --git a/tests/Console/Command/ValidateTest.php b/tests/Console/Command/ValidateCommandTest.php similarity index 98% rename from tests/Console/Command/ValidateTest.php rename to tests/Console/Command/ValidateCommandTest.php index 3f017ace2..04651b17a 100644 --- a/tests/Console/Command/ValidateTest.php +++ b/tests/Console/Command/ValidateCommandTest.php @@ -28,13 +28,13 @@ /** * @internal */ -#[CoversClass(Validate::class)] +#[CoversClass(ValidateCommand::class)] #[CoversClass(MessageRenderer::class)] -class ValidateTest extends CommandTestCase +class ValidateCommandTest extends CommandTestCase { protected function getCommand(): Command { - return new Validate(); + return new ValidateCommand(); } public function test_it_validates_a_given_file(): void diff --git a/tests/Console/Command/VerifyTest.php b/tests/Console/Command/VerifyCommandTest.php similarity index 97% rename from tests/Console/Command/VerifyTest.php rename to tests/Console/Command/VerifyCommandTest.php index e4a8fd665..4a0ec9987 100644 --- a/tests/Console/Command/VerifyTest.php +++ b/tests/Console/Command/VerifyCommandTest.php @@ -28,8 +28,8 @@ /** * @internal */ -#[CoversClass(Verify::class)] -class VerifyTest extends CommandTestCase +#[CoversClass(VerifyCommand::class)] +class VerifyCommandTest extends CommandTestCase { use RequiresPharReadonlyOff; @@ -44,7 +44,7 @@ protected function setUp(): void protected function getCommand(): Command { - return new Verify(); + return new VerifyCommand(); } #[DataProvider('passingPharPathsProvider')]