From 9185fb10e26c3ec3e65971dbcc22c2b5299f1c5b Mon Sep 17 00:00:00 2001 From: Val Bancer Date: Fri, 23 Feb 2018 16:21:33 +0100 Subject: [PATCH] fixes Error: Class 'PHP_CodeCoverage' not found error --- lib/Cake/TestSuite/CakeTestRunner.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Cake/TestSuite/CakeTestRunner.php b/lib/Cake/TestSuite/CakeTestRunner.php index dfd2321de..f6a7b976d 100644 --- a/lib/Cake/TestSuite/CakeTestRunner.php +++ b/lib/Cake/TestSuite/CakeTestRunner.php @@ -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');