Skip to content

Commit

Permalink
Fix TestSuiteMapper for PHPUnit 9.5 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 7, 2020
1 parent 5924911 commit a417612
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Model/TestCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ public function __construct(ConfigurationHolder $configurationHolder)
// PHPUnit < 9.3
$testSuiteMapper = new \PHPUnit\TextUI\Configuration\TestSuiteMapper();
} elseif (class_exists('PHPUnit\TextUI\XmlConfiguration\TestSuiteMapper', true)) {
// PHPUnit >= 9.3
$testSuiteMapper = new \PHPUnit\TextUI\XmlConfiguration\TestSuiteMapper();
// PHPUnit >= 9.3 & < 9.5
$testSuiteMapper = new \PHPUnit\TextUI\XmlConfiguration\TestSuiteMappe();
} elseif (class_exists('PHPUnit\TextUI\TestSuiteMapper', true)) {
// PHPUnit >= 9.5
$testSuiteMapper = new \PHPUnit\TextUI\TestSuiteMapper();
} else {
throw new \RuntimeException('Could not find PHPUnit TestSuiteMapper class');
}
Expand Down

0 comments on commit a417612

Please sign in to comment.