Browse Source

Fixed more unit tests

Jose Lorenzo Rodriguez 12 years ago
parent
commit
f31bb876e7

+ 7 - 7
tests/TestCase/ORM/Association/BelongsToTest.php

@@ -99,7 +99,7 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
 				'conditions' => new QueryExpression([
 					'Companies.is_active' => true,
 					['Companies.id' => $field]
-				]),
+				], ['Companies.id' => 'integer']),
 				'table' => 'companies',
 				'type' => 'LEFT'
 			]
@@ -164,7 +164,7 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
 				'conditions' => new QueryExpression([
 					'Companies.is_active' => true,
 					['Companies.id' => $field]
-				]),
+				], ['Companies.id' => 'integer']),
 				'type' => 'LEFT',
 				'table' => 'companies',
 			]
@@ -191,10 +191,10 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
 		$query->expects($this->once())->method('join')->with([
 			'Companies' => [
 				'conditions' => new QueryExpression([
+					'a' => 1,
 					'Companies.is_active' => true,
-					['Companies.id' => $field],
-					new QueryExpression(['a' => 1])
-				]),
+					['Companies.id' => $field]
+				], ['Companies.id' => 'integer']),
 				'type' => 'LEFT',
 				'table' => 'companies',
 			]
@@ -231,7 +231,7 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
 				'conditions' => new QueryExpression([
 					'Companies.is_active' => true,
 					['Companies.id' => $field]
-				]),
+				], ['Companies.id' => 'integer']),
 				'table' => 'companies',
 				'type' => 'INNER'
 			]
@@ -313,7 +313,7 @@ class BelongsToTest extends \Cake\TestSuite\TestCase {
 				'conditions' => new QueryExpression([
 					'Companies.is_active' => true,
 					['Companies.id' => $field1, 'Companies.tenant_id' => $field2]
-				]),
+				], ['Companies.id' => 'integer']),
 				'table' => 'companies',
 				'type' => 'LEFT'
 			]

+ 1 - 1
tests/TestCase/ORM/Association/HasManyTest.php

@@ -631,9 +631,9 @@ class HasManyTest extends \Cake\TestSuite\TestCase {
 		$query->expects($this->once())->method('join')->with([
 			'Articles' => [
 				'conditions' => new QueryExpression([
+					'a' => 1,
 					'Articles.is_active' => true,
 					['Authors.id' => $field],
-					new QueryExpression(['a' => 1])
 				]),
 				'type' => 'INNER',
 				'table' => 'articles'

+ 1 - 1
tests/TestCase/ORM/Association/HasOneTest.php

@@ -193,9 +193,9 @@ class HasOneTest extends \Cake\TestSuite\TestCase {
 		$query->expects($this->once())->method('join')->with([
 			'Profiles' => [
 				'conditions' => new QueryExpression([
+					'a' => 1,
 					'Profiles.is_active' => true,
 					['Users.id' => $field],
-					new QueryExpression(['a' => 1])
 				]),
 				'type' => 'INNER',
 				'table' => 'profiles'