mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #84 from tPl0ch/2.0-testloader
Adding a failsafe plugin load in tests case runner so it is possible to run tests on plugins that have not been loaded in bootstrap
This commit is contained in:
commit
a19ff8e20f
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
$result = CORE_TEST_CASES;
|
||||
} elseif (!empty($params['app'])) {
|
||||
$result = APP_TEST_CASES;
|
||||
} else if (!empty($params['plugin']) && CakePlugin::loaded($params['plugin'])) {
|
||||
} else if (!empty($params['plugin'])) {
|
||||
if (!CakePlugin::loaded($params['plugin'])) {
|
||||
CakePlugin::load($params['plugin']);
|
||||
}
|
||||
$pluginPath = CakePlugin::path($params['plugin']);
|
||||
$result = $pluginPath . 'Test' . DS . 'Case';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue