Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making CodeCoverageManager get its settings from the reporter. This

makes code coverage much less reliant on GET parameters.
  • Loading branch information...
commit d79bacd1ed7b7452c59c663d8b998c3b511919d8 1 parent 03da53b
@markstory markstory authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 cake/tests/lib/code_coverage_manager.php
View
12 cake/tests/lib/code_coverage_manager.php
@@ -96,24 +96,24 @@ function &getInstance() {
*/
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);
Please sign in to comment.
Something went wrong with that request. Please try again.