Browse Source

Fix tests on postgres

ADmad 10 years ago
parent
commit
a5fb82d4da
1 changed files with 6 additions and 2 deletions
  1. 6 2
      tests/TestCase/ORM/TableTest.php

+ 6 - 2
tests/TestCase/ORM/TableTest.php

@@ -2808,13 +2808,17 @@ class TableTest extends TestCase
     {
         $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);
     }