Fixing left over action from previos refactoring of viewClass/view.

This commit is contained in:
mark_story 2011-03-07 21:50:53 -05:00
parent 0d3288bab0
commit de57802f05
2 changed files with 15 additions and 1 deletions

View file

@ -680,7 +680,7 @@ class View extends Object {
}
if ($name === null) {
$name = $this->action;
$name = $this->view;
}
$name = str_replace('/', DS, $name);

View file

@ -701,6 +701,20 @@ class ViewTest extends CakeTestCase {
$this->assertPattern("/<div id=\"content\">posts index<\/div>/", $result);
}
/**
* test that View::$view works
*
* @return void
*/
function testRenderUsingViewProperty() {
$this->PostsController->view = 'cache_form';
$View = new TestView($this->PostsController);
$this->assertEquals('cache_form', $View->view);
$result = $View->render();
$this->assertRegExp('/Add User/', $result);
}
/**
* test that view vars can replace the local helper variables
* and not overwrite the $this->Helper references