Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jan 18, 2022
1 parent 73b0627 commit 74a4108
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Smoke/PharTest.php
Expand Up @@ -55,8 +55,11 @@ public static function setUpBeforeClass(): void

public function testVersion(): void
{
/** @phpstan-ignore-next-line to avoid `Ternary operator condition is always true|false.` */
$shouldExpectCodename = Application::VERSION_CODENAME ? 1 : 0;

static::assertMatchesRegularExpression(
sprintf("/^PHP CS Fixer (?<version>%s)(?<git_sha> \\([a-z0-9]+\\))?(?<codename> %s){%d}(?<by> by .*)\nPHP runtime: (?<php_version>\\d\\.\\d+\\..*)$/", Application::VERSION, Application::VERSION_CODENAME, Application::VERSION_CODENAME ? 1 : 0),
sprintf("/^PHP CS Fixer (?<version>%s)(?<git_sha> \\([a-z0-9]+\\))?(?<codename> %s){%d}(?<by> by .*)\nPHP runtime: (?<php_version>\\d\\.\\d+\\..*)$/", Application::VERSION, Application::VERSION_CODENAME, $shouldExpectCodename),
self::executePharCommand('--version')->getOutput()
);
}
Expand Down

0 comments on commit 74a4108

Please sign in to comment.