diff --git a/lib/Cake/Test/Case/Model/ModelValidationTest.php b/lib/Cake/Test/Case/Model/ModelValidationTest.php index af3b02a4b..d313a33df 100644 --- a/lib/Cake/Test/Case/Model/ModelValidationTest.php +++ b/lib/Cake/Test/Case/Model/ModelValidationTest.php @@ -588,7 +588,7 @@ class ModelValidationTest extends BaseModelTest { $this->assertFalse($result, 'Save occurred even when with models failed. %s'); $this->assertEquals($expectedError, $JoinThing->validationErrors); $count = $Something->find('count', array('conditions' => array('Something.id' => $data['Something']['id']))); - $this->assertSame($count, 0); + $this->assertSame(0, $count); $data = array( 'Something' => array( @@ -651,7 +651,7 @@ class ModelValidationTest extends BaseModelTest { $this->assertEquals($expectedError, $JoinThing->validationErrors); $count = $Something->find('count', array('conditions' => array('Something.id' => $data['Something']['id']))); - $this->assertSame($count, 0); + $this->assertSame(0, $count); $joinRecords = $JoinThing->find('count', array( 'conditions' => array('JoinThing.something_id' => $data['Something']['id']) @@ -692,11 +692,11 @@ class ModelValidationTest extends BaseModelTest { $Author->create(); $result = $Author->saveAll($data, array('validate' => 'first')); $this->assertTrue($result); - $this->assertFalse($Author->id === null); + $this->assertNotNull($Author->id); $id = $Author->id; $count = $Author->find('count', array('conditions' => array('Author.id' => $id))); - $this->assertSame($count, 1); + $this->assertSame(1, $count); $count = $Post->find('count', array( 'conditions' => array('Post.author_id' => $id) @@ -2315,7 +2315,7 @@ class ModelValidationTest extends BaseModelTest { ), ), ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -2376,7 +2376,7 @@ class ModelValidationTest extends BaseModelTest { ), ), ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } }