Skip to content

Commit

Permalink
Merge pull request #126 from oliverklee/bugfix/tests
Browse files Browse the repository at this point in the history
[BUGFIX] Be more lenient when checking the output in a string
  • Loading branch information
bmack authored Jun 3, 2024
2 parents 2bfdd8d + ed47519 commit eabf8eb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Unit/Smoke/AbstractCliTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eabf8eb

Please sign in to comment.