From 69ba1965b8a4d57ced8f77a8c909fd6a25ac92e7 Mon Sep 17 00:00:00 2001 From: Frank de Graaf Date: Tue, 4 Oct 2011 09:43:35 +0200 Subject: [PATCH] Changed the order of the include for the custom reporter and added file_exists() to prevent errors. --- cake/tests/lib/cake_test_suite_dispatcher.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;