mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
fixing theme view test usage of error handler
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7024 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d5f71ccadf
commit
deb972d13d
1 changed files with 13 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
|||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
App::import('Core', array('Theme', 'Controller'));
|
||||
App::import('Core', array('Theme', 'Controller', 'Error'));
|
||||
|
||||
if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
|
||||
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
|
||||
|
@ -42,6 +42,13 @@ class ThemePostsController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
class ThemeViewTestErrorHandler extends ErrorHandler {
|
||||
|
||||
function stop() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
class TestThemeView extends ThemeView {
|
||||
|
||||
function renderElement($name, $params = array()) {
|
||||
|
@ -54,6 +61,11 @@ class TestThemeView extends ThemeView {
|
|||
function getLayoutFileName($name = null) {
|
||||
return $this->_getLayoutFileName($name);
|
||||
}
|
||||
|
||||
function cakeError($method, $messages) {
|
||||
$error =& new ViewTestErrorHandler($method, $messages);
|
||||
return $error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue