Permalink
Browse files

Enabling group code coverage on plugins outside APP/plugins path.

  • Loading branch information...
1 parent 3e4a963 commit 81414b717542173761a213f3c97f16c7bcc0ea5e @renan renan committed Jan 26, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 cake/tests/lib/code_coverage_manager.php
@@ -118,7 +118,7 @@ function start() {
}
/**
- * Stops/pauses code coverage collection. Does not clean the
+ * Stops/pauses code coverage collection. Does not clean the
* code coverage memory. Use clean() to clear code coverage memory
*
* @return void
@@ -159,7 +159,7 @@ function setParams(&$reporter) {
}
/**
- * Stops the current code coverage analyzation and dumps a nice report
+ * Stops the current code coverage analyzation and dumps a nice report
* depending on the reporter that was passed to start()
*
* @return void
@@ -559,6 +559,7 @@ function __testObjectFilesFromGroupFile($groupFile, $isApp = true) {
$groupContent = file_get_contents($path);
$ds = '\s*\.\s*DS\s*\.\s*';
$pluginTest = 'APP\.\'plugins\'' . $ds . '\'' . $manager->pluginTest . '\'' . $ds . '\'tests\'' . $ds . '\'cases\'';
+ $pluginTest .= '|App::pluginPath\(\'' . $manager->pluginTest . '\'\)' . $ds . '\'tests\'' . $ds . '\'cases\'';
$pattern = '/\s*TestManager::addTestFile\(\s*\$this,\s*(' . $pluginTest . '|APP_TEST_CASES|CORE_TEST_CASES)' . $ds . '(.*?)\)/i';
preg_match_all($pattern, $groupContent, $matches);

0 comments on commit 81414b7

Please sign in to comment.