diff --git a/tests/Unit/Smoke/AbstractCliTestCase.php b/tests/Unit/Smoke/AbstractCliTestCase.php index 4f5343d..2bd03cb 100644 --- a/tests/Unit/Smoke/AbstractCliTestCase.php +++ b/tests/Unit/Smoke/AbstractCliTestCase.php @@ -56,14 +56,12 @@ public function testVersion(): void public function testSetup(): void { $command = (new Application())->find('setup'); - $commandTester = new CommandTester($command); + $commandTester->execute(['--target-dir' => self::getRootPath()]); + $output = self::executeCliCommand('setup')->getOutput(); - self::assertSame( - $commandTester->getDisplay(), - self::executeCliCommand('setup')->getOutput() - ); + self::assertStringContainsString('[ERROR] A .php-cs-fixer.dist.php file already exists,', $output); } public function testSetupHelp(): void