Merge pull request #11750 from bancer/11528-code-coverage

fixes Error: Class 'PHP_CodeCoverage' not found error
This commit is contained in:
Mark Story 2018-07-13 13:24:19 -04:00 committed by GitHub
commit ee02d4274f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,14 @@
if (!class_exists('PHPUnit_TextUI_TestRunner')) {
require_once 'PHPUnit/TextUI/TestRunner.php';
}
if (class_exists('SebastianBergmann\CodeCoverage\CodeCoverage')) {
class_alias('SebastianBergmann\CodeCoverage\CodeCoverage', 'PHP_CodeCoverage');
class_alias('SebastianBergmann\CodeCoverage\Report\Text', 'PHP_CodeCoverage_Report_Text');
class_alias('SebastianBergmann\CodeCoverage\Report\PHP', 'PHP_CodeCoverage_Report_PHP');
class_alias('SebastianBergmann\CodeCoverage\Report\Clover', 'PHP_CodeCoverage_Report_Clover');
class_alias('SebastianBergmann\CodeCoverage\Report\Html\Facade', 'PHP_CodeCoverage_Report_HTML');
class_alias('SebastianBergmann\CodeCoverage\Exception', 'PHP_CodeCoverage_Exception');
}
App::uses('CakeFixtureManager', 'TestSuite/Fixture');