From d79bacd1ed7b7452c59c663d8b998c3b511919d8 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 9 Jan 2010 22:41:49 -0500 Subject: [PATCH] Making CodeCoverageManager get its settings from the reporter. This makes code coverage much less reliant on GET parameters. --- cake/tests/lib/code_coverage_manager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cake/tests/lib/code_coverage_manager.php b/cake/tests/lib/code_coverage_manager.php index 81af4a040..eb6294e1c 100644 --- a/cake/tests/lib/code_coverage_manager.php +++ b/cake/tests/lib/code_coverage_manager.php @@ -96,24 +96,24 @@ class CodeCoverageManager { */ function start($testCaseFile, &$reporter) { $manager =& CodeCoverageManager::getInstance(); - $manager->reporter = $reporter; + $manager->reporter =& $reporter; $testCaseFile = str_replace(DS . DS, DS, $testCaseFile); $thisFile = str_replace('.php', '.test.php', basename(__FILE__)); if (strpos($testCaseFile, $thisFile) !== false) { trigger_error('Xdebug supports no parallel coverage analysis - so this is not possible.', E_USER_ERROR); } - - if (isset($_GET['app'])) { + + if ($reporter->params['app']) { $manager->appTest = true; } - if (isset($_GET['group'])) { + if ($reporter->params['group']) { $manager->groupTest = true; } - if (isset($_GET['plugin'])) { - $manager->pluginTest = Inflector::underscore($_GET['plugin']); + if ($reporter->params['plugin']) { + $manager->pluginTest = Inflector::underscore($reporter->params['plugin']); } $manager->testCaseFile = $testCaseFile; xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);