Browse Source

minor #5629 DX: fix CiIntegrationTest (keradus)

This PR was merged into the 2.18 branch.

Discussion
----------

DX: fix CiIntegrationTest

Commits
-------

a2ede3ca4 DX: fix CiIntegrationTest
Dariusz Ruminski 3 years ago
parent
commit
035830e063
1 changed files with 6 additions and 1 deletions
  1. 6 1
      tests/Smoke/CiIntegrationTest.php

+ 6 - 1
tests/Smoke/CiIntegrationTest.php

@@ -149,11 +149,16 @@ Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Exec
 If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you!
 ';
 
+        /** @phpstan-ignore-next-line to avoid `Ternary operator condition is always true|false.` */
+        $aboutSubpattern = Application::VERSION_CODENAME
+            ? 'PHP CS Fixer '.preg_quote(Application::VERSION, '/').' '.preg_quote(Application::VERSION_CODENAME, '/').' by Fabien Potencier and Dariusz Ruminski'
+            : 'PHP CS Fixer '.preg_quote(Application::VERSION, '/').' by Fabien Potencier and Dariusz Ruminski';
+
         $pattern = sprintf(
             '/^(?:%s)?(?:%s)?%s\n%s\n%s\n([\.S]{%d})\n%s$/',
             preg_quote($optionalIncompatibilityWarning, '/'),
             preg_quote($optionalXdebugWarning, '/'),
-            'PHP CS Fixer '.preg_quote(Application::VERSION, '/').' '.preg_quote(Application::VERSION_CODENAME, '/').' by Fabien Potencier and Dariusz Ruminski',
+            $aboutSubpattern,
             preg_quote(sprintf('Runtime: PHP %s', PHP_VERSION), '/'),
             preg_quote('Loaded config default from ".php_cs.dist".', '/'),
             \strlen($expectedResult3Files),