Skip to content
Permalink
Browse files

simplyfy test and correct some test param orders

  • Loading branch information...
dereuromark committed Aug 16, 2013
1 parent 6cf147e commit 47e8e0c57a3e2a79c008a1be3d2795bf1d726a64
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Cake/Test/Case/Model/ModelValidationTest.php
@@ -588,7 +588,7 @@ public function testValidatesWithAssociations() {
$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 @@ public function testValidatesWithModelsAndSaveAll() {
$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 @@ public function testValidatesWithModelsAndSaveAllWithoutId() {
$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 @@ public function testValidateAssociatedAtomicFalseDeepTrueWithErrors() {
),
),
);
$this->assertEquals($result, $expected);
$this->assertEquals($expected, $result);
}
/**
@@ -2376,7 +2376,7 @@ public function testValidateManyAtomicFalseDeepTrueWithErrors() {
),
),
);
$this->assertEquals($result, $expected);
$this->assertEquals($expected, $result);
}
}

0 comments on commit 47e8e0c

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.