Fix notice error when a missing action error is hit.

This commit is contained in:
mark_story 2012-07-29 22:37:41 -04:00
parent 7b939186a1
commit 4541510e26

View file

@ -246,7 +246,7 @@ abstract class ControllerTestCase extends CakeTestCase {
} }
$Dispatch->loadRoutes = $this->loadRoutes; $Dispatch->loadRoutes = $this->loadRoutes;
$Dispatch->parseParams(new CakeEvent('ControllerTestCase', $Dispatch, array('request' => $request))); $Dispatch->parseParams(new CakeEvent('ControllerTestCase', $Dispatch, array('request' => $request)));
if (!isset($request->params['controller'])) { if (!isset($request->params['controller']) && Router::currentRoute()) {
$this->headers = Router::currentRoute()->response->header(); $this->headers = Router::currentRoute()->response->header();
return; return;
} }