diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index 1a2043895..cb842deeb 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -206,6 +206,10 @@ class SecurityComponent extends Component { * @return void */ public function startup(Controller $controller) { + if ($controller->name == 'CakeError') { + return true; + } + $this->request = $controller->request; $this->_action = $this->request->params['action']; $this->_methodsRequired($controller); diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 41778b357..20adfbf90 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -136,24 +136,14 @@ class CakeTestSuiteDispatcher { * @return boolean true if found, false otherwise */ public function loadTestFramework() { - $found = $path = null; - - if (@include 'PHPUnit' . DS . 'Autoload.php') { - $found = true; - } - - if (!$found) { - foreach (App::path('vendors') as $vendor) { - if (is_dir($vendor . 'PHPUnit')) { - $path = $vendor; - } - } - - if ($path && ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'))) { - $found = include 'PHPUnit' . DS . 'Autoload.php'; + foreach (App::path('vendors') as $vendor) { + if (is_dir($vendor . 'PHPUnit')) { + ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path')); + break; } } - return $found; + + return include 'PHPUnit' . DS . 'Autoload.php'; } /**