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:
gwoo 2008-04-15 16:06:50 +00:00
parent ed105de578
commit 561f1deee0

View file

@ -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);
}
}
?>