diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 2d2f886ec..30b74e2f4 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -694,6 +694,13 @@ class CakeTestCase extends UnitTestCase { TESTS . 'fixtures', VENDORS . 'tests' . DS . 'fixtures' ); + $pluginPaths = Configure::read('pluginPaths'); + foreach ($pluginPaths as $path) { + if (file_exists($path . $pluginName . DS . 'tests' . DS. 'fixtures')) { + $fixturePaths[0] = $path . $pluginName . DS . 'tests' . DS. 'fixtures'; + break; + } + } } else { $fixturePaths = array( TESTS . 'fixtures', diff --git a/cake/tests/lib/code_coverage_manager.php b/cake/tests/lib/code_coverage_manager.php index 35a3ed457..3e9493fe0 100644 --- a/cake/tests/lib/code_coverage_manager.php +++ b/cake/tests/lib/code_coverage_manager.php @@ -515,6 +515,15 @@ class CodeCoverageManager { if (!!$manager->pluginTest) { $path = APP . 'plugins' . DS . $manager->pluginTest . DS . 'tests' . DS . 'groups'; + + $pluginPaths = Configure::read('pluginPaths'); + foreach ($pluginPaths as $pluginPath) { + $tmpPath = $pluginPath . $manager->pluginTest . DS . 'tests' . DS. 'groups'; + if (file_exists($tmpPath)) { + $path = $tmpPath; + break; + } + } } $path .= DS . $groupFile . $testManager->_groupExtension; @@ -707,10 +716,22 @@ class CodeCoverageManager { if ($isApp) { $path .= APP_DIR . DS; } elseif (!!$manager->pluginTest) { - $path .= APP_DIR . DS . 'plugins' . DS . $manager->pluginTest . DS; + $pluginPath = APP . 'plugins' . DS . $manager->pluginTest . DS; + + $pluginPaths = Configure::read('pluginPaths'); + foreach ($pluginPaths as $tmpPath) { + $tmpPath = $tmpPath . $manager->pluginTest . DS; + if (file_exists($tmpPath)) { + $pluginPath = $tmpPath; + break; + } + } + + $path = $pluginPath; } else { $path = TEST_CAKE_CORE_INCLUDE_PATH; } + return $path; } /** @@ -738,4 +759,4 @@ class CodeCoverageManager { return false; } } -?> +?> \ No newline at end of file