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 Feb 6, 2019
1 parent 205b0ba commit 3e4a969
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 @@ -90,6 +90,18 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
if ($exit) {
exit($exit);
}
// Fix compatibility to custom TestRunner for PhpUnit 8 compatibility
if ($PHPUNIT_VERSION >= 8.0) {
$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 3e4a969

Please sign in to comment.