diff --git a/cake/tests/lib/cake_test_suite_dispatcher.php b/cake/tests/lib/cake_test_suite_dispatcher.php index 734b6003e..000ca095d 100644 --- a/cake/tests/lib/cake_test_suite_dispatcher.php +++ b/cake/tests/lib/cake_test_suite_dispatcher.php @@ -184,10 +184,10 @@ class CakeTestSuiteDispatcher { $appClass = $this->params['output'] . 'Reporter'; $appFile = APPLIBS . 'test_suite' . DS . 'reporter' . DS . $type . '_reporter.php'; - if (include_once $coreFile) { - $Reporter =& new $coreClass(null, $this->params); - } elseif (include_once $appFile) { + if (file_exists($appFile) && include_once $appFile) { $Reporter =& new $appClass(null, $this->params); + } elseif (include_once $coreFile) { + $Reporter =& new $coreClass(null, $this->params); } } return $Reporter;