mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
adding test case, closes #3132
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6662 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ed105de578
commit
561f1deee0
1 changed files with 14 additions and 0 deletions
|
@ -160,5 +160,19 @@ class ControllerTest extends CakeTestCase {
|
|||
$Controller->set($viewVars);
|
||||
$this->assertTrue(array_key_exists('modelName', $Controller->viewVars));
|
||||
}
|
||||
|
||||
function testRender() {
|
||||
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS));
|
||||
|
||||
$Controller =& new Controller();
|
||||
$Controller->viewPath = 'posts';
|
||||
|
||||
$result = $Controller->render('index');
|
||||
$this->assertPattern('/posts index/', $result);
|
||||
|
||||
$result = $Controller->render('/elements/test_element');
|
||||
$this->assertPattern('/this is the test element/', $result);
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue