mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing bad include on text reporter.
Fixing bad includes and updating usage in text coverage reports.
This commit is contained in:
parent
fb756c5aee
commit
10c78c5420
2 changed files with 5 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
|||
* @since CakePHP(tm) v 2.0
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
require_once dirname(__FILE__) . '/base_coverage_report.php';
|
||||
App::uses('BaseCoverageReport', 'TestSuite/Coverage');
|
||||
|
||||
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
include_once dirname(__FILE__) . DS . 'cake_base_reporter.php';
|
||||
App::uses('CakeBaseReporter', 'TestSuite/Reporter');
|
||||
App::uses('TextCoverageReport', 'TestSuite/Coverage');
|
||||
|
||||
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
|
||||
|
||||
|
@ -91,7 +92,7 @@ class CakeTextReporter extends CakeBaseReporter {
|
|||
echo 'Peak memory: ' . number_format(memory_get_peak_usage()) . " bytes\n";
|
||||
|
||||
if (isset($this->params['codeCoverage']) && $this->params['codeCoverage']) {
|
||||
$coverage = $result->getCodeCoverageInformation();
|
||||
$coverage = $result->getCodeCoverage()->getSummary();
|
||||
echo $this->paintCoverage($coverage);
|
||||
}
|
||||
}
|
||||
|
@ -184,8 +185,6 @@ class CakeTextReporter extends CakeBaseReporter {
|
|||
* @return string
|
||||
*/
|
||||
public function paintCoverage($coverage) {
|
||||
$file = dirname(dirname(__FILE__)) . '/coverage/text_coverage_report.php';
|
||||
include $file;
|
||||
$reporter = new TextCoverageReport($coverage, $this);
|
||||
echo $reporter->report();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue