Browse Source

Forcing the Articles to contain Tags for test passing

Patrick Conroy 11 years ago
parent
commit
d1d63a85aa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/test_app/TestApp/Model/Table/ArticlesTable.php

+ 1 - 1
tests/test_app/TestApp/Model/Table/ArticlesTable.php

@@ -61,7 +61,7 @@ class ArticlesTable extends Table {
  */
 	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']]);
 			});
 		}