Skip to content

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 25, 2012
1 parent 2841611 commit c4b9fa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Model/ModelWriteTest.php
Expand Up @@ -58,7 +58,7 @@ public function testInsertAnotherHabtmRecordWithSameForeignKey() {
$lastInsertId = $TestModel->JoinAsJoinB->getLastInsertID();
$data['id'] = $lastInsertId;
$this->assertEquals(array('JoinAsJoinB' => $data), $result);
$this->assertTrue($lastInsertId);
$this->assertTrue($lastInsertId > 0);

$result = $TestModel->JoinAsJoinB->findById(1);
$expected = array(
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Validation.php
Expand Up @@ -860,7 +860,7 @@ public static function luhn($check, $deep = false) {
if ($deep !== true) {
return true;
}
if (!$check) {
if ((int)$check === 0) {
return false;
}
$sum = 0;
Expand Down

0 comments on commit c4b9fa6

Please sign in to comment.