From 0d620a7731bfdb5a458149f32df77a4a64c3c609 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 15 Jun 2014 18:26:36 +0200 Subject: [PATCH] Trying to fix flaky test on postgres --- tests/TestCase/ORM/QueryRegressionTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/TestCase/ORM/QueryRegressionTest.php b/tests/TestCase/ORM/QueryRegressionTest.php index d4bc863dafb..24b70e031f6 100644 --- a/tests/TestCase/ORM/QueryRegressionTest.php +++ b/tests/TestCase/ORM/QueryRegressionTest.php @@ -234,7 +234,12 @@ public function testBelongsToManyDeepSave($strategy) { 'Highlights' => ['associated' => ['_joinData' => ['associated' => ['Authors']], 'Authors']] ] ]); - $entity = $articles->get(2, ['contain' => ['SpecialTags.Authors', 'Highlights.Authors']]); + $entity = $articles->get(2, [ + 'contain' => [ + 'SpecialTags.Authors' => ['sort' => ['Authors.id']], + 'Highlights.Authors' => ['sort' => ['Authors.id']] + ] + ]); $this->assertEquals('mariano', end($entity->special_tags)->author->name); $this->assertEquals('mark', end($entity->highlights)->author->name); }