enabling different paths for plugin tests closes #5105

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7378 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
DarkAngelBGE 2008-07-30 13:39:17 +00:00
parent 838ecb8527
commit 1fdc76ba1a
2 changed files with 30 additions and 2 deletions

View file

@ -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',

View file

@ -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;
}
/**