fixing view test usage of error handler

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7023 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-05-23 05:26:33 +00:00
parent 08c5472a3e
commit d5f71ccadf

View file

@ -26,7 +26,7 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
App::import('Core', array('View', 'Controller'));
App::import('Core', array('View', 'Controller', 'Error'));
if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
@ -43,6 +43,13 @@ class ViewPostsController extends Controller {
}
}
class ViewTestErrorHandler extends ErrorHandler {
function stop() {
return;
}
}
class TestView extends View {
function renderElement($name, $params = array()) {
@ -59,6 +66,11 @@ class TestView extends View {
function loadHelpers(&$loaded, $helpers, $parent = null) {
return $this->_loadHelpers($loaded, $helpers, $parent);
}
function cakeError($method, $messages) {
$error =& new ViewTestErrorHandler($method, $messages);
return $error;
}
}
class TestAfterHelper extends Helper {