Skip to content
This repository
Browse code

Adding missing reference operators for php4 compatibility.

  • Loading branch information...
commit 34c4af549c834c971cd488d3b6b47fd670f966ac 1 parent f1a0690
Mark Story authored January 15, 2010

Showing 1 changed file with 14 additions and 14 deletions. Show diff stats Hide diff stats

  1. 28  cake/tests/cases/libs/view/view.test.php
28  cake/tests/cases/libs/view/view.test.php
@@ -634,7 +634,7 @@ function testAfterLayout() {
634 634
  */
635 635
 	function testRenderLoadHelper() {
636 636
 		$this->PostsController->helpers = array('Session', 'Html', 'Form', 'Ajax');
637  
-		$View = new TestView($this->PostsController);
  637
+		$View =& new TestView($this->PostsController);
638 638
 
639 639
 		$result = $View->_render($View->getViewFileName('index'), array());
640 640
 		$this->assertEqual($result, 'posts index');
@@ -646,7 +646,7 @@ function testRenderLoadHelper() {
646 646
 		$this->assertTrue(is_object($helpers['ajax']->Html));
647 647
 
648 648
 		$this->PostsController->helpers = array('Html', 'Form', 'Ajax', 'TestPlugin.PluggedHelper');
649  
-		$View = new TestView($this->PostsController);
  649
+		$View =& new TestView($this->PostsController);
650 650
 
651 651
 		$result = $View->_render($View->getViewFileName('index'), array());
652 652
 		$this->assertEqual($result, 'posts index');
@@ -674,7 +674,7 @@ function testRenderLoadHelper() {
674 674
  * @return void
675 675
  */
676 676
 	function testRender() {
677  
-		$View = new TestView($this->PostsController);
  677
+		$View =& new TestView($this->PostsController);
678 678
 		$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
679 679
 
680 680
 		$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);
@@ -686,7 +686,7 @@ function testRender() {
686 686
 		$this->PostsController->set('pause', 3);
687 687
 		$this->PostsController->set('page_title', 'yo what up');
688 688
 
689  
-		$View = new TestView($this->PostsController);
  689
+		$View =& new TestView($this->PostsController);
690 690
 		$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render(false, 'flash'));
691 691
 
692 692
 		$this->assertPattern("/<title>yo what up<\/title>/", $result);
@@ -700,7 +700,7 @@ function testRender() {
700 700
 		$this->PostsController->params['action'] = 'index';
701 701
 		Configure::write('Cache.check', true);
702 702
 
703  
-		$View = new TestView($this->PostsController);
  703
+		$View =& new TestView($this->PostsController);
704 704
 		$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
705 705
 
706 706
 		$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);
@@ -717,9 +717,9 @@ function testRenderLayoutWithMockCacheHelper() {
717 717
 		$_check = Configure::read('Cache.check');
718 718
 		Configure::write('Cache.check', true);
719 719
 
720  
-		$Controller = new ViewPostsController();
  720
+		$Controller =& new ViewPostsController();
721 721
 		$Controller->cacheAction = '1 day';
722  
-		$View = new View($Controller);
  722
+		$View =& new View($Controller);
723 723
 		$View->loaded['cache'] = new ViewTestMockCacheHelper();
724 724
 		$View->loaded['cache']->expectCallCount('cache', 2);
725 725
 
@@ -736,10 +736,10 @@ function testRenderLayoutWithMockCacheHelper() {
736 736
  * @return void
737 737
  */
738 738
 	function testViewVarOverwritingLocalHelperVar() {
739  
-		$Controller = new ViewPostsController();
  739
+		$Controller =& new ViewPostsController();
740 740
 		$Controller->helpers = array('Session', 'Html');
741 741
 		$Controller->set('html', 'I am some test html');
742  
-		$View = new View($Controller);
  742
+		$View =& new View($Controller);
743 743
 		$result = $View->render('helper_overwrite', false);
744 744
 
745 745
 		$this->assertPattern('/I am some test html/', $result);
@@ -753,7 +753,7 @@ function testViewVarOverwritingLocalHelperVar() {
753 753
  * @return void
754 754
  */
755 755
 	function testViewFileName() {
756  
-		$View = new TestView($this->PostsController);
  756
+		$View =& new TestView($this->PostsController);
757 757
 
758 758
 		$result = $View->getViewFileName('index');
759 759
 		$this->assertPattern('/posts(\/|\\\)index.ctp/', $result);
@@ -785,7 +785,7 @@ function testRenderCache() {
785 785
 			return;
786 786
 		}
787 787
 		$view = 'test_view';
788  
-		$View = new View($this->PostsController);
  788
+		$View =& new View($this->PostsController);
789 789
 		$path = CACHE . 'views' . DS . 'view_cache_'.$view;
790 790
 
791 791
 		$cacheText = '<!--cachetime:'.time().'-->some cacheText';
@@ -857,7 +857,7 @@ function testRenderNocache() {
857 857
  * @return void
858 858
  */
859 859
 	function testSet() {
860  
-		$View = new TestView($this->PostsController);
  860
+		$View =& new TestView($this->PostsController);
861 861
 		$View->viewVars = array();
862 862
 		$View->set('somekey', 'someValue');
863 863
 		$this->assertIdentical($View->viewVars, array('somekey' => 'someValue'));
@@ -883,7 +883,7 @@ function testSet() {
883 883
  * @return void
884 884
  */
885 885
 	function testEntityReference() {
886  
-		$View = new TestView($this->PostsController);
  886
+		$View =& new TestView($this->PostsController);
887 887
 		$View->model = 'Post';
888 888
 		$View->field = 'title';
889 889
 		$this->assertEqual($View->entity(), array('Post', 'title'));
@@ -913,7 +913,7 @@ function testBadExt() {
913 913
 		$this->assertPattern("/posts(\/|\\\)this_is_missing.whatever/", $result);
914 914
 
915 915
 		$this->PostsController->ext = ".bad";
916  
-		$View = new TestView($this->PostsController);
  916
+		$View =& new TestView($this->PostsController);
917 917
 		$result = str_replace(array("\t", "\r\n", "\n"), "", $View->render('index'));
918 918
 
919 919
 		$this->assertPattern("/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>/", $result);

0 notes on commit 34c4af5

Please sign in to comment.
Something went wrong with that request. Please try again.