mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-12 06:56:24 +00:00
Fixing left over action from previos refactoring of viewClass/view.
This commit is contained in:
parent
0d3288bab0
commit
de57802f05
2 changed files with 15 additions and 1 deletions
|
@ -680,7 +680,7 @@ class View extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name === null) {
|
if ($name === null) {
|
||||||
$name = $this->action;
|
$name = $this->view;
|
||||||
}
|
}
|
||||||
$name = str_replace('/', DS, $name);
|
$name = str_replace('/', DS, $name);
|
||||||
|
|
||||||
|
|
|
@ -701,6 +701,20 @@ class ViewTest extends CakeTestCase {
|
||||||
$this->assertPattern("/<div id=\"content\">posts index<\/div>/", $result);
|
$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
|
* test that view vars can replace the local helper variables
|
||||||
* and not overwrite the $this->Helper references
|
* and not overwrite the $this->Helper references
|
||||||
|
|
Loading…
Add table
Reference in a new issue