Skip to content
Browse files

Fixing occurances of CakeTestsGetReporter and fixing issues loading r…

…eporters.
  • Loading branch information...
1 parent dd5a886 commit 9a62fd52b38725a80c985300cb52de0111b6d357 @markstory markstory committed
Showing with 6 additions and 8 deletions.
  1. +6 −8 cake/tests/lib/cake_test_suite_dispatcher.php
View
14 cake/tests/lib/cake_test_suite_dispatcher.php
@@ -121,16 +121,14 @@ function getManager() {
function &getReporter() {
static $Reporter = NULL;
if (!$Reporter) {
- $coreClass = 'Cake' . $this->params['output'] . 'Reporter';
+ $coreClass = 'Cake' . ucwords($this->params['output']) . 'Reporter';
$coreFile = CAKE_TESTS_LIB . 'cake_' . strtolower($this->params['output']) . '_reporter.php';
-
+
$appClass = $this->params['output'] . 'Reporter';
$appFile = APPLIBS . 'test_suite' . DS . strtolower($this->params['output']) . '_reporter.php';
- if (file_exists($coreFile)) {
- require_once $coreFile;
+ if (include_once $coreFile) {
$Reporter =& new $coreClass();
- } elseif (file_exists($appFile)) {
- require_once $appFile;
+ } elseif (include_once $appFile) {
$Reporter =& new $appClass();
}
}
@@ -187,10 +185,10 @@ function _runGroupTest() {
*/
function _runTestCase() {
if ($this->params['codeCoverage']) {
- CodeCoverageManager::start($_GET['case'], CakeTestsGetReporter());
+ CodeCoverageManager::start($_GET['case'], CakeTestSuiteDispatcher::getReporter());
}
- TestManager::runTestCase($_GET['case'], CakeTestsGetReporter());
+ TestManager::runTestCase($_GET['case'], CakeTestSuiteDispatcher::getReporter());
if ($this->params['codeCoverage']) {
CodeCoverageManager::report();

0 comments on commit 9a62fd5

Please sign in to comment.
Something went wrong with that request. Please try again.