diff --git a/lib/Cake/Test/Case/Core/CakePluginTest.php b/lib/Cake/Test/Case/Core/CakePluginTest.php
index 3e402f10048..73221b8dc40 100644
--- a/lib/Cake/Test/Case/Core/CakePluginTest.php
+++ b/lib/Cake/Test/Case/Core/CakePluginTest.php
@@ -210,10 +210,10 @@ public function testLoadNotFound() {
public function testPath() {
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
- $this->assertEquals(CakePlugin::path('TestPlugin'), $expected);
+ $this->assertEquals($expected, CakePlugin::path('TestPlugin'));
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
- $this->assertEquals(CakePlugin::path('TestPluginTwo'), $expected);
+ $this->assertEquals($expected, CakePlugin::path('TestPluginTwo'));
}
/**
diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php
index ee2f9dfadb3..c44291a3f7d 100644
--- a/lib/Cake/Test/Case/Core/ObjectTest.php
+++ b/lib/Cake/Test/Case/Core/ObjectTest.php
@@ -375,62 +375,62 @@ public function testToString() {
public function testMethodDispatching() {
$this->object->emptyMethod();
$expected = array('emptyMethod');
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->oneParamMethod('Hello');
$expected[] = array('oneParamMethod' => array('Hello'));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->twoParamMethod(true, false);
$expected[] = array('twoParamMethod' => array(true, false));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->threeParamMethod(true, false, null);
$expected[] = array('threeParamMethod' => array(true, false, null));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->crazyMethod(1, 2, 3, 4, 5, 6, 7);
$expected[] = array('crazyMethod' => array(1, 2, 3, 4, 5, 6, 7));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object = new TestObject();
$this->assertSame($this->object->methodCalls, array());
$this->object->dispatchMethod('emptyMethod');
$expected = array('emptyMethod');
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('oneParamMethod', array('Hello'));
$expected[] = array('oneParamMethod' => array('Hello'));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('twoParamMethod', array(true, false));
$expected[] = array('twoParamMethod' => array(true, false));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('threeParamMethod', array(true, false, null));
$expected[] = array('threeParamMethod' => array(true, false, null));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('fourParamMethod', array(1, 2, 3, 4));
$expected[] = array('fourParamMethod' => array(1, 2, 3, 4));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('fiveParamMethod', array(1, 2, 3, 4, 5));
$expected[] = array('fiveParamMethod' => array(1, 2, 3, 4, 5));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('crazyMethod', array(1, 2, 3, 4, 5, 6, 7));
$expected[] = array('crazyMethod' => array(1, 2, 3, 4, 5, 6, 7));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('methodWithOptionalParam', array('Hello'));
$expected[] = array('methodWithOptionalParam' => array("Hello"));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
$this->object->dispatchMethod('methodWithOptionalParam');
$expected[] = array('methodWithOptionalParam' => array(null));
- $this->assertSame($this->object->methodCalls, $expected);
+ $this->assertSame($expected, $this->object->methodCalls);
}
/**
diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php
index aa80aeae4d5..e97e5fdc54b 100644
--- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php
+++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php
@@ -1507,8 +1507,8 @@ public function testAutoConstructAssociations() {
'conditions' => '', 'fields' => '', 'order' => '', 'counterCache' => ''
)
);
- $this->assertSame($TestModel->belongsTo, $expected);
- $this->assertSame($TestFakeModel->belongsTo, $expected);
+ $this->assertSame($expected, $TestModel->belongsTo);
+ $this->assertSame($expected, $TestFakeModel->belongsTo);
$this->assertEquals('User', $TestModel->User->name);
$this->assertEquals('User', $TestFakeModel->User->name);
@@ -1525,8 +1525,8 @@ public function testAutoConstructAssociations() {
'dependent' => ''
));
- $this->assertSame($TestModel->hasOne, $expected);
- $this->assertSame($TestFakeModel->hasOne, $expected);
+ $this->assertSame($expected, $TestModel->hasOne);
+ $this->assertSame($expected, $TestFakeModel->hasOne);
$this->assertEquals('Featured', $TestModel->Featured->name);
$this->assertEquals('Featured', $TestFakeModel->Featured->name);
@@ -1546,8 +1546,8 @@ public function testAutoConstructAssociations() {
'counterQuery' => ''
));
- $this->assertSame($TestModel->hasMany, $expected);
- $this->assertSame($TestFakeModel->hasMany, $expected);
+ $this->assertSame($expected, $TestModel->hasMany);
+ $this->assertSame($expected, $TestFakeModel->hasMany);
$this->assertEquals('Comment', $TestModel->Comment->name);
$this->assertEquals('Comment', $TestFakeModel->Comment->name);
@@ -1569,8 +1569,8 @@ public function testAutoConstructAssociations() {
'finderQuery' => '',
));
- $this->assertSame($TestModel->hasAndBelongsToMany, $expected);
- $this->assertSame($TestFakeModel->hasAndBelongsToMany, $expected);
+ $this->assertSame($expected, $TestModel->hasAndBelongsToMany);
+ $this->assertSame($expected, $TestFakeModel->hasAndBelongsToMany);
$this->assertEquals('Tag', $TestModel->Tag->name);
$this->assertEquals('Tag', $TestFakeModel->Tag->name);
diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php
index a58fb9f9c46..1f499892085 100644
--- a/lib/Cake/Test/Case/Routing/RouterTest.php
+++ b/lib/Cake/Test/Case/Routing/RouterTest.php
@@ -2323,10 +2323,10 @@ public function testGetParams() {
'named' => array(), 'pass' => array(),
'param1' => '1', 'param2' => '2',
);
- $this->assertEquals(Router::getParams(), $expected);
- $this->assertEquals(Router::getParam('controller'), false);
- $this->assertEquals(Router::getParam('param1'), '1');
- $this->assertEquals(Router::getParam('param2'), '2');
+ $this->assertEquals($expected, Router::getParams());
+ $this->assertEquals(false, Router::getParam('controller'));
+ $this->assertEquals('1', Router::getParam('param1'));
+ $this->assertEquals('2', Router::getParam('param2'));
Router::reload();
@@ -2336,8 +2336,8 @@ public function testGetParams() {
'plugin' => null, 'controller' => 'pages', 'action' => 'display',
'named' => array(), 'pass' => array(),
);
- $this->assertEquals(Router::getParams(), $expected);
- $this->assertEquals(Router::getParams(true), $expected);
+ $this->assertEquals($expected, Router::getParams());
+ $this->assertEquals($expected, Router::getParams(true));
}
/**
diff --git a/lib/Cake/Test/Case/Utility/HashTest.php b/lib/Cake/Test/Case/Utility/HashTest.php
index 426781f5ee9..1d35363cce3 100644
--- a/lib/Cake/Test/Case/Utility/HashTest.php
+++ b/lib/Cake/Test/Case/Utility/HashTest.php
@@ -531,7 +531,7 @@ public function testMerge() {
'Validator',
'Transactional'
);
- $this->assertEquals(Hash::merge($a, $b), $expected);
+ $this->assertEquals($expected, Hash::merge($a, $b));
}
/**
@@ -1461,7 +1461,7 @@ public function testRemoveMulti() {
2 => array('Item' => array('id' => 3, 'title' => 'third')),
4 => array('Item' => array('id' => 5, 'title' => 'fifth')),
);
- $this->assertEquals($result, $expected);
+ $this->assertEquals($expected, $result);
}
/**
diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php
index 1641a368fbe..029b17a3560 100644
--- a/lib/Cake/Test/Case/Utility/SetTest.php
+++ b/lib/Cake/Test/Case/Utility/SetTest.php
@@ -182,7 +182,7 @@ public function testMerge() {
$expected = array('users' => array('lisa' => array('id' => 5, 'pw' => 'you-will-never-guess', 'age' => 25, 'pet' => 'dog')), 'cakephp', 'ice-cream', 'chocolate');
$this->assertEquals($expected, Set::merge($a, $b, $c));
- $this->assertEquals(Set::merge($a, $b, array(), $c), $expected);
+ $this->assertEquals($expected, Set::merge($a, $b, array(), $c));
$r = Set::merge($a, $b, $c);
$this->assertEquals($expected, $r);
@@ -1733,7 +1733,7 @@ public function testWritingWithFunkyKeys() {
$this->assertFalse(Set::check($set, 'Session Test'));
$expected = array('Session Test' => array('Test Case' => 'test'));
- $this->assertEquals(Set::insert(array(), 'Session Test.Test Case', "test"), $expected);
+ $this->assertEquals($expected, Set::insert(array(), 'Session Test.Test Case', "test"));
$this->assertTrue(Set::check($expected, 'Session Test.Test Case'));
}
diff --git a/lib/Cake/Test/Case/Utility/StringTest.php b/lib/Cake/Test/Case/Utility/StringTest.php
index abcc9e1a2d1..775f02832c1 100644
--- a/lib/Cake/Test/Case/Utility/StringTest.php
+++ b/lib/Cake/Test/Case/Utility/StringTest.php
@@ -656,7 +656,7 @@ public function testHighlightHtml() {
$this->assertEquals($this->Text->highlight($text3, array('strong', 'what'), $options), $text3);
$expected = 'What a strong mouse: ';
- $this->assertEquals($this->Text->highlight($text4, array('strong', 'what'), $options), $expected);
+ $this->assertEquals($expected, $this->Text->highlight($text4, array('strong', 'what'), $options));
}
/**
diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php
index aee409d8121..b09e6ad8ef4 100644
--- a/lib/Cake/Test/Case/Utility/XmlTest.php
+++ b/lib/Cake/Test/Case/Utility/XmlTest.php
@@ -782,7 +782,7 @@ public function testRss() {
'pubDate' => 'Tue, 31 Aug 2010 01:42:00 -0500',
'guid' => 'http://bakery.cakephp.org/articles/view/alertpay-automated-sales-via-ipn'
);
- $this->assertSame($rssAsArray['rss']['channel']['item'][1], $expected);
+ $this->assertSame($expected, $rssAsArray['rss']['channel']['item'][1]);
$rss = array(
'rss' => array(
@@ -848,7 +848,7 @@ public function testXmlRpc() {
'params' => ''
)
);
- $this->assertSame(Xml::toArray($xml), $expected);
+ $this->assertSame($expected, Xml::toArray($xml));
$xml = Xml::build('test12Egypt0-31');
$expected = array(
@@ -872,7 +872,7 @@ public function testXmlRpc() {
)
)
);
- $this->assertSame(Xml::toArray($xml), $expected);
+ $this->assertSame($expected, Xml::toArray($xml));
$xmlText = <<
@@ -914,7 +914,7 @@ public function testXmlRpc() {
)
)
);
- $this->assertSame(Xml::toArray($xml), $expected);
+ $this->assertSame($expected, Xml::toArray($xml));
$xml = Xml::fromArray($expected, 'tags');
$this->assertXmlStringEqualsXmlString($xmlText, $xml->asXML());
@@ -1038,7 +1038,7 @@ public function testNamespace() {
);
$expected = '<' . '?xml version="1.0" encoding="UTF-8"?>1';
$xmlResponse = Xml::fromArray($xml);
- $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlResponse->asXML()), $expected);
+ $this->assertEquals($expected, str_replace(array("\r", "\n"), '', $xmlResponse->asXML()));
$xml = array(
'root' => array(