diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index 235081efe..0178cb9e6 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -634,7 +634,7 @@ class ViewTest extends CakeTestCase { */ 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 @@ class ViewTest extends CakeTestCase { $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 @@ class ViewTest extends CakeTestCase { * @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("//", $result); @@ -686,7 +686,7 @@ class ViewTest extends CakeTestCase { $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 @@ class ViewTest extends CakeTestCase { $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 @@ class ViewTest extends CakeTestCase { $_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 @@ class ViewTest extends CakeTestCase { * @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 @@ class ViewTest extends CakeTestCase { * @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 @@ class ViewTest extends CakeTestCase { 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 @@ class ViewTest extends CakeTestCase { * @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 @@ class ViewTest extends CakeTestCase { * @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 @@ class ViewTest extends CakeTestCase { $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);