Skip to content
This repository
Browse code

Fix failing tests.

  • Loading branch information...
commit c4b9fa6c7ab5a47e5d4aab28a7e1071342c47a78 1 parent 2841611
Mark Story authored October 24, 2012
2  lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -58,7 +58,7 @@ public function testInsertAnotherHabtmRecordWithSameForeignKey() {
58 58
 		$lastInsertId = $TestModel->JoinAsJoinB->getLastInsertID();
59 59
 		$data['id'] = $lastInsertId;
60 60
 		$this->assertEquals(array('JoinAsJoinB' => $data), $result);
61  
-		$this->assertTrue($lastInsertId);
  61
+		$this->assertTrue($lastInsertId > 0);
62 62
 
63 63
 		$result = $TestModel->JoinAsJoinB->findById(1);
64 64
 		$expected = array(
2  lib/Cake/Utility/Validation.php
@@ -860,7 +860,7 @@ public static function luhn($check, $deep = false) {
860 860
 		if ($deep !== true) {
861 861
 			return true;
862 862
 		}
863  
-		if (!$check) {
  863
+		if ((int)$check === 0) {
864 864
 			return false;
865 865
 		}
866 866
 		$sum = 0;

0 notes on commit c4b9fa6

Please sign in to comment.
Something went wrong with that request. Please try again.