Skip to content

Commit

Permalink
Fix PhpUnit 8 runner compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Apr 7, 2019
1 parent 226b36e commit 537f37e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
Expand Up @@ -131,6 +131,18 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
if ($exit) {
exit($exit);
}
if ($PHPUNIT_VERSION >= 8.0) {
// Fix compatibility to custom TestRunner for PhpUnit 8
$testRunnerFile = 'src/TextUI/TestRunner.php';
file_put_contents(
$testRunnerFile,
str_replace(
'final class TestRunner',
'class TestRunner',
file_get_contents($testRunnerFile)
)
);
}
file_put_contents('phpunit', <<<'EOPHP'
<?php
Expand Down

0 comments on commit 537f37e

Please sign in to comment.