From 973dce916ad396f3e63ce061137db59ee63afde3 Mon Sep 17 00:00:00 2001 From: euromark Date: Thu, 23 Feb 2012 17:27:40 +0100 Subject: [PATCH] php5 corrections --- lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php | 4 ++-- .../Test/Case/Controller/Component/PaginatorComponentTest.php | 2 +- lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php | 2 +- lib/Cake/Test/Case/Model/ModelIntegrationTest.php | 2 +- lib/Cake/Test/Case/Utility/FileTest.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php index c9ae26447af..35011be1af5 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php @@ -170,7 +170,7 @@ public function testParseServerStringNonLatin() { * @return void */ public function testParseServerStringUnix() { - $Memcache =& new TestMemcacheEngine(); + $Memcache = new TestMemcacheEngine(); $result = $Memcache->parseServerString('unix:///path/to/memcached.sock'); $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0)); } @@ -385,7 +385,7 @@ public function testZeroDuration() { * @return void */ public function testLongDurationEqualToZero() { - $memcache =& new TestMemcacheEngine(); + $memcache = new TestMemcacheEngine(); $memcache->settings['compress'] = false; $mock = $this->getMock('Memcache'); diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index 13d198084b0..0fbc2f71dd7 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -862,7 +862,7 @@ public function testPaginateMaxLimit() { * @return void */ public function testPaginateOrderVirtualFieldSharedWithRealField() { - $Controller =& new Controller($this->request); + $Controller = new Controller($this->request); $Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment'); $Controller->constructClasses(); $Controller->PaginatorControllerComment->virtualFields = array( diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index adcd1df8dc2..53ae3115710 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -66,7 +66,7 @@ public function tearDown() { public function testCountWithConditions() { $this->loadFixtures('Translate', 'TranslatedItem'); - $Model =& new TranslatedItem(); + $Model = new TranslatedItem(); $Model->locale = 'eng'; $result = $Model->find('count', array( 'conditions' => array( diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index 3e2f59f47df..b1366a8301f 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -242,7 +242,7 @@ public function testDynamicBehaviorAttachment() { */ public function testFindWithJoinsOption() { $this->loadFixtures('Article', 'User'); - $TestUser =& new User(); + $TestUser = new User(); $options = array( 'fields' => array( diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 9537b896ed8..8d94a895617 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -434,7 +434,7 @@ public function testDeleteAfterRead() { if (!file_exists($tmpFile)) { touch($tmpFile); } - $File =& new File($tmpFile); + $File = new File($tmpFile); $File->read(); $this->assertTrue($File->delete()); }