From d1d63a85aa48b9073903e356b964caac2e9f49c4 Mon Sep 17 00:00:00 2001 From: Patrick Conroy Date: Tue, 26 Aug 2014 12:54:08 -0400 Subject: [PATCH] Forcing the Articles to contain Tags for test passing --- tests/test_app/TestApp/Model/Table/ArticlesTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_app/TestApp/Model/Table/ArticlesTable.php b/tests/test_app/TestApp/Model/Table/ArticlesTable.php index 303120a0308..ee23c815cee 100644 --- a/tests/test_app/TestApp/Model/Table/ArticlesTable.php +++ b/tests/test_app/TestApp/Model/Table/ArticlesTable.php @@ -61,7 +61,7 @@ public function doSomethingElse() { */ public function findCustomTags(Query $query, array $options = []) { if (isset($options['tags']) && is_array($options['tags'])) { - return $query->matching('Tags', function($q) use ($options) { + return $query->contain(['Tags'])->matching('Tags', function($q) use ($options) { return $q->where(['Tags.id IN' => $options['tags']]); }); }