Skip to content

Commit

Permalink
Fixed more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 22, 2014
1 parent edcaeea commit f31bb87
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tests/TestCase/ORM/Association/BelongsToTest.php
Expand Up @@ -99,7 +99,7 @@ public function testAttachTo() {
'conditions' => new QueryExpression([
'Companies.is_active' => true,
['Companies.id' => $field]
]),
], ['Companies.id' => 'integer']),
'table' => 'companies',
'type' => 'LEFT'
]
Expand Down Expand Up @@ -164,7 +164,7 @@ public function testAttachToNoFields() {
'conditions' => new QueryExpression([
'Companies.is_active' => true,
['Companies.id' => $field]
]),
], ['Companies.id' => 'integer']),
'type' => 'LEFT',
'table' => 'companies',
]
Expand All @@ -191,10 +191,10 @@ public function testAttachToWithQueryBuilder() {
$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',
]
Expand Down Expand Up @@ -231,7 +231,7 @@ public function testAttachToMatching() {
'conditions' => new QueryExpression([
'Companies.is_active' => true,
['Companies.id' => $field]
]),
], ['Companies.id' => 'integer']),
'table' => 'companies',
'type' => 'INNER'
]
Expand Down Expand Up @@ -313,7 +313,7 @@ public function testAttachToMultiPrimaryKey() {
'conditions' => new QueryExpression([
'Companies.is_active' => true,
['Companies.id' => $field1, 'Companies.tenant_id' => $field2]
]),
], ['Companies.id' => 'integer']),
'table' => 'companies',
'type' => 'LEFT'
]
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/Association/HasManyTest.php
Expand Up @@ -631,9 +631,9 @@ public function testAttachToWithQueryBuilder() {
$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'
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/Association/HasOneTest.php
Expand Up @@ -193,9 +193,9 @@ public function testAttachToWithQueryBuilder() {
$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'
Expand Down

0 comments on commit f31bb87

Please sign in to comment.