From 6ef9579774248feab335c98cb2236540adc45b29 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 27 Mar 2014 09:53:28 +0100 Subject: [PATCH] Fixing some failing tests --- tests/TestCase/ORM/Association/BelongsToManyTest.php | 12 ++++++------ tests/TestCase/ORM/Association/HasManyTest.php | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/TestCase/ORM/Association/BelongsToManyTest.php b/tests/TestCase/ORM/Association/BelongsToManyTest.php index e59deb44275..7c716eec894 100644 --- a/tests/TestCase/ORM/Association/BelongsToManyTest.php +++ b/tests/TestCase/ORM/Association/BelongsToManyTest.php @@ -439,14 +439,14 @@ public function testEagerLoader() { $callable = $association->eagerLoader(compact('keys', 'query')); $row = ['Articles__id' => 1, 'title' => 'article 1']; $result = $callable($row); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ ['id' => 1, 'name' => 'foo', '_joinData' => ['article_id' => 1]] ]; $this->assertEquals($row, $result); $row = ['Articles__id' => 2, 'title' => 'article 2']; $result = $callable($row); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ ['id' => 2, 'name' => 'bar', '_joinData' => ['article_id' => 2]] ]; $this->assertEquals($row, $result); @@ -682,14 +682,14 @@ public function testEagerLoaderSubquery() { 'keys' => [] ]); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ ['id' => 1, 'name' => 'foo', '_joinData' => ['article_id' => 1]] ]; $row['Articles__id'] = 1; $result = $callable($row); $this->assertEquals($row, $result); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ ['id' => 2, 'name' => 'bar', '_joinData' => ['article_id' => 2]] ]; $row['Articles__id'] = 2; @@ -834,7 +834,7 @@ public function testEagerLoaderMultipleKeys() { $callable = $association->eagerLoader(compact('keys', 'query')); $row = ['Articles__id' => 1, 'title' => 'article 1', 'Articles__site_id' => 1]; $result = $callable($row); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ [ 'id' => 1, 'name' => 'foo', @@ -846,7 +846,7 @@ public function testEagerLoaderMultipleKeys() { $row = ['Articles__id' => 2, 'title' => 'article 2', 'Articles__site_id' => 2]; $result = $callable($row); - $row['Tags__Tags'] = [ + $row['Tags___collection_'] = [ [ 'id' => 2, 'name' => 'bar', diff --git a/tests/TestCase/ORM/Association/HasManyTest.php b/tests/TestCase/ORM/Association/HasManyTest.php index f0372d7fc5e..f253a88a9c4 100644 --- a/tests/TestCase/ORM/Association/HasManyTest.php +++ b/tests/TestCase/ORM/Association/HasManyTest.php @@ -132,14 +132,14 @@ public function testEagerLoader() { $callable = $association->eagerLoader(compact('keys', 'query')); $row = ['Authors__id' => 1, 'username' => 'author 1']; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 2, 'title' => 'article 2', 'author_id' => 1] ]; $this->assertEquals($row, $result); $row = ['Authors__id' => 2, 'username' => 'author 2']; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 1, 'title' => 'article 1', 'author_id' => 2] ]; $this->assertEquals($row, $result); @@ -347,14 +347,14 @@ public function testEagerLoaderSubquery() { ]); $row = ['Authors__id' => 1, 'username' => 'author 1']; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 2, 'title' => 'article 2', 'author_id' => 1] ]; $this->assertEquals($row, $result); $row = ['Authors__id' => 2, 'username' => 'author 2']; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 1, 'title' => 'article 1', 'author_id' => 2] ]; $this->assertEquals($row, $result); @@ -447,14 +447,14 @@ public function testEagerLoaderMultipleKeys() { $callable = $association->eagerLoader(compact('keys', 'query')); $row = ['Authors__id' => 2, 'Authors__site_id' => 10, 'username' => 'author 1']; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 1, 'title' => 'article 1', 'author_id' => 2, 'site_id' => 10] ]; $this->assertEquals($row, $result); $row = ['Authors__id' => 1, 'username' => 'author 2', 'Authors__site_id' => 20]; $result = $callable($row); - $row['Articles__Articles'] = [ + $row['Articles___collection_'] = [ ['id' => 2, 'title' => 'article 2', 'author_id' => 1, 'site_id' => 20] ]; $this->assertEquals($row, $result);