Changing require to require_once to make tests less order dependent.

This commit is contained in:
Mark Story 2010-01-16 19:41:52 -05:00
parent 34fed29d05
commit c4ef429004
3 changed files with 6 additions and 10 deletions

View file

@ -33,9 +33,8 @@ if (!class_exists('ShellDispatcher')) {
ob_end_clean();
}
if (!class_exists('ExtractTask')) {
require CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'extract.php';
}
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'extract.php';
Mock::generatePartial(
'ShellDispatcher', 'TestExtractTaskMockShellDispatcher',

View file

@ -32,9 +32,7 @@ if (!class_exists('ShellDispatcher')) {
ob_end_clean();
}
if (!class_exists('ProjectTask')) {
require CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'project.php';
}
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'project.php';
Mock::generatePartial(
'ShellDispatcher', 'TestProjectTaskMockShellDispatcher',

View file

@ -34,10 +34,9 @@ if (!class_exists('ShellDispatcher')) {
ob_end_clean();
}
if (!class_exists('TestTask')) {
require CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'test.php';
require CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'template.php';
}
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'test.php';
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'template.php';
Mock::generatePartial(
'ShellDispatcher', 'TestTestTaskMockShellDispatcher',