mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
838ecb8527
commit
1fdc76ba1a
2 changed files with 30 additions and 2 deletions
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue