From a5fb82d4da9ddf86b1d951ed074833fa6d1f94bc Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 18 Apr 2016 10:56:22 +0530 Subject: [PATCH] Fix tests on postgres --- tests/TestCase/ORM/TableTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/TestCase/ORM/TableTest.php b/tests/TestCase/ORM/TableTest.php index 503cb7a06c0..81bd675c6ac 100644 --- a/tests/TestCase/ORM/TableTest.php +++ b/tests/TestCase/ORM/TableTest.php @@ -2808,13 +2808,17 @@ public function testSaveManyResultSet() { $table = TableRegistry::get('authors'); - $entities = $table->find()->all(); + $entities = $table->find() + ->order(['id' => 'ASC']) + ->all(); $entities->first()->name = 'admad'; $result = $table->saveMany($entities); $this->assertSame($entities, $result); - $first = $table->find()->first(); + $first = $table->find() + ->order(['id' => 'ASC']) + ->first(); $this->assertSame('admad', $first->name); }