From b46c4b3e3f7006906ff60a63a6a08e939f14877c Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 12 Dec 2011 20:35:31 -0800 Subject: [PATCH] Correcting assertEquals parameter order --- lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php | 8 ++++---- lib/Cake/Test/Case/Model/BehaviorCollectionTest.php | 2 +- .../Test/Case/Model/Datasource/Database/MysqlTest.php | 6 +++--- lib/Cake/Test/Case/Model/ModelIntegrationTest.php | 2 +- lib/Cake/Test/Case/Model/ModelReadTest.php | 10 +++++----- lib/Cake/Test/Case/Routing/RouterTest.php | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index beaf957007c..177d7788a94 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -361,7 +361,7 @@ public function testMaskSetting() { $write = Cache::write('masking_test', $data, 'mask_test'); $result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4); $expected = '0664'; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); Cache::delete('masking_test', 'mask_test'); Cache::drop('mask_test'); @@ -369,7 +369,7 @@ public function testMaskSetting() { $write = Cache::write('masking_test', $data, 'mask_test'); $result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4); $expected = '0666'; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); Cache::delete('masking_test', 'mask_test'); Cache::drop('mask_test'); @@ -377,7 +377,7 @@ public function testMaskSetting() { $write = Cache::write('masking_test', $data, 'mask_test'); $result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4); $expected = '0644'; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); Cache::delete('masking_test', 'mask_test'); Cache::drop('mask_test'); @@ -385,7 +385,7 @@ public function testMaskSetting() { $write = Cache::write('masking_test', $data, 'mask_test'); $result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4); $expected = '0640'; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); Cache::delete('masking_test', 'mask_test'); Cache::drop('mask_test'); } diff --git a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php index fe4c6f6637f..f2cea74f895 100644 --- a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php +++ b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php @@ -890,7 +890,7 @@ public function testBehaviorSaveCallbacks() { $Sample->create(); $result = $Sample->save($record); $expected['Sample']['id'] = $Sample->id; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $Sample->Behaviors->attach('Test', array('beforeSave' => 'modify', 'afterSave' => 'modify')); $expected = Set::merge($record, array('Sample' => array('name' => 'sample99 modified before modified after on create'))); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 53062c901b1..ec98d7f05ad 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -1932,7 +1932,7 @@ public function testStringConditionsParsing() { $conditions = array('Company.name similar to ' => 'a word'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `Company`.`name` similar to 'a word'"; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -2104,7 +2104,7 @@ public function testArrayConditionsParsing() { $result = $this->Dbo->conditions(array('lower(Article.title)' => 'secrets')); $expected = " WHERE lower(`Article`.`title`) = 'secrets'"; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = $this->Dbo->conditions(array('title LIKE' => '%hello')); $expected = " WHERE `title` LIKE '%hello'"; @@ -2279,7 +2279,7 @@ public function testArrayConditionsParsing() { $conditions = array('MysqlModel.id' => ''); $result = $this->Dbo->conditions($conditions, true, true, $this->model); $expected = " WHERE `MysqlModel`.`id` IS NULL"; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = $this->Dbo->conditions(array('Listing.beds >=' => 0)); $expected = " WHERE `Listing`.`beds` >= 0"; diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index 890156e48ef..908b0f62bfc 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -272,7 +272,7 @@ function testFindWithJoinsOption() { array('User' => array('user' => 'mariano'), 'Article' => array('published' => 'Y')), array('User' => array('user' => 'nate'), 'Article' => array('published' => '')) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index 5b44c17af42..979a17ab253 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -7561,7 +7561,7 @@ public function testVirtualFieldsOrder() { '2' => 'Second Post', '1' => 'First Post' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = $Post->find('list', array('order' => array('Post.other_field' => 'DESC'))); $expected = array( @@ -7569,23 +7569,23 @@ public function testVirtualFieldsOrder() { '2' => 'Second Post', '3' => 'Third Post' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $Post->Author->virtualFields = array('joined' => 'Post.id * Author.id'); $result = $Post->find('all'); $result = Set::extract('{n}.Author.joined', $result); $expected = array(1, 6, 3); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = $Post->find('all', array('order' => array('Author.joined' => 'ASC'))); $result = Set::extract('{n}.Author.joined', $result); $expected = array(1, 3, 6); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = $Post->find('all', array('order' => array('Author.joined' => 'DESC'))); $result = Set::extract('{n}.Author.joined', $result); $expected = array(6, 3, 1); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index 938b119a914..3fcd431c195 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -149,7 +149,7 @@ public function testPluginMapResources() { 'action' => 'index', '[method]' => 'GET' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $this->assertEquals($resources, array('test_plugin')); $_SERVER['REQUEST_METHOD'] = 'GET'; @@ -163,7 +163,7 @@ public function testPluginMapResources() { 'id' => '13', '[method]' => 'GET' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -189,7 +189,7 @@ public function testPluginMapResourcesWithPrefix() { 'action' => 'index', '[method]' => 'GET' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $this->assertEquals($resources, array('test_plugin')); }