Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding missing reference operators for php4 compatibility.

  • Loading branch information...
commit 34c4af549c834c971cd488d3b6b47fd670f966ac 1 parent f1a0690
Mark Story markstory authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 cake/tests/cases/libs/view/view.test.php
28 cake/tests/cases/libs/view/view.test.php
View
@@ -634,7 +634,7 @@ function testAfterLayout() {
*/
function testRenderLoadHelper() {
$this->PostsController->helpers = array('Session', 'Html', 'Form', 'Ajax');
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = $View->_render($View->getViewFileName('index'), array());
$this->assertEqual($result, 'posts index');
@@ -646,7 +646,7 @@ function testRenderLoadHelper() {
$this->assertTrue(is_object($helpers['ajax']->Html));
$this->PostsController->helpers = array('Html', 'Form', 'Ajax', 'TestPlugin.PluggedHelper');
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = $View->_render($View->getViewFileName('index'), array());
$this->assertEqual($result, 'posts index');
@@ -674,7 +674,7 @@ function testRenderLoadHelper() {
* @return void
*/
function testRender() {
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);
@@ -686,7 +686,7 @@ function testRender() {
$this->PostsController->set('pause', 3);
$this->PostsController->set('page_title', 'yo what up');
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render(false, 'flash'));
$this->assertPattern("/<title>yo what up<\/title>/", $result);
@@ -700,7 +700,7 @@ function testRender() {
$this->PostsController->params['action'] = 'index';
Configure::write('Cache.check', true);
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);
@@ -717,9 +717,9 @@ function testRenderLayoutWithMockCacheHelper() {
$_check = Configure::read('Cache.check');
Configure::write('Cache.check', true);
- $Controller = new ViewPostsController();
+ $Controller =& new ViewPostsController();
$Controller->cacheAction = '1 day';
- $View = new View($Controller);
+ $View =& new View($Controller);
$View->loaded['cache'] = new ViewTestMockCacheHelper();
$View->loaded['cache']->expectCallCount('cache', 2);
@@ -736,10 +736,10 @@ function testRenderLayoutWithMockCacheHelper() {
* @return void
*/
function testViewVarOverwritingLocalHelperVar() {
- $Controller = new ViewPostsController();
+ $Controller =& new ViewPostsController();
$Controller->helpers = array('Session', 'Html');
$Controller->set('html', 'I am some test html');
- $View = new View($Controller);
+ $View =& new View($Controller);
$result = $View->render('helper_overwrite', false);
$this->assertPattern('/I am some test html/', $result);
@@ -753,7 +753,7 @@ function testViewVarOverwritingLocalHelperVar() {
* @return void
*/
function testViewFileName() {
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = $View->getViewFileName('index');
$this->assertPattern('/posts(\/|\\\)index.ctp/', $result);
@@ -785,7 +785,7 @@ function testRenderCache() {
return;
}
$view = 'test_view';
- $View = new View($this->PostsController);
+ $View =& new View($this->PostsController);
$path = CACHE . 'views' . DS . 'view_cache_'.$view;
$cacheText = '<!--cachetime:'.time().'-->some cacheText';
@@ -857,7 +857,7 @@ function testRenderNocache() {
* @return void
*/
function testSet() {
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$View->viewVars = array();
$View->set('somekey', 'someValue');
$this->assertIdentical($View->viewVars, array('somekey' => 'someValue'));
@@ -883,7 +883,7 @@ function testSet() {
* @return void
*/
function testEntityReference() {
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$View->model = 'Post';
$View->field = 'title';
$this->assertEqual($View->entity(), array('Post', 'title'));
@@ -913,7 +913,7 @@ function testBadExt() {
$this->assertPattern("/posts(\/|\\\)this_is_missing.whatever/", $result);
$this->PostsController->ext = ".bad";
- $View = new TestView($this->PostsController);
+ $View =& new TestView($this->PostsController);
$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);
Please sign in to comment.
Something went wrong with that request. Please try again.