Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When relying on the order of returned objects, sort explicitly as it …

…is nondeterminate for non-MySQL.
  • Loading branch information...
commit 89ec7e622e1ed669a2c391bdfb5ee70c3365ebe9 1 parent 2c0257e
@simonwelsh simonwelsh authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/tests/LeftAndMainTest.php
View
4 admin/tests/LeftAndMainTest.php
@@ -24,7 +24,7 @@ function setUp() {
public function testSaveTreeNodeSorting() {
$this->loginWithPermission('ADMIN');
- $rootPages = DataObject::get('LeftAndMainTest_Object', '"ParentID" = 0'); // implicitly sorted
+ $rootPages = DataObject::get('LeftAndMainTest_Object', '"ParentID" = 0', '"ID"'); // forcing sorting for non-MySQL
$siblingIDs = $rootPages->column('ID');
$page1 = $rootPages->offsetGet(0);
$page2 = $rootPages->offsetGet(1);
@@ -197,4 +197,4 @@ class LeftAndMainTest_Object extends DataObject implements TestOnly {
'Hierarchy'
);
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.