From ec35f78d92c0836fd4a22685ad97deb975157c2b Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 26 Jan 2014 16:13:13 +0100 Subject: [PATCH] More work trying to fix eager loading ans tranlate behavior --- tests/TestCase/Model/Behavior/TranslateBehaviorTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php b/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php index bcad7c05494..cc02d9bdd57 100644 --- a/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php +++ b/tests/TestCase/Model/Behavior/TranslateBehaviorTest.php @@ -315,9 +315,12 @@ public function testTranslationsHasMany() { $comments = $table->hasMany('Comments')->target(); $comments->addBehavior('Translate', ['fields' => ['comment']]); - $results = $table->find('translations')->contain(['Comments' => function($q) { - return $q->find('translations')->select(['id', 'comment', 'article_id']); - }]); + $results = $table->find('translations')->contain([ + 'Comments' => function($q) { + debug(\Cake\Utility\Debugger::trace()); + return $q->find('translations')->select(['id', 'comment', 'article_id']); + } + ]); $article = $results->first();