From 89ec7e622e1ed669a2c391bdfb5ee70c3365ebe9 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sat, 29 Oct 2011 14:45:44 +1300 Subject: [PATCH] When relying on the order of returned objects, sort explicitly as it is nondeterminate for non-MySQL. --- admin/tests/LeftAndMainTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/tests/LeftAndMainTest.php b/admin/tests/LeftAndMainTest.php index 0b55a478d..e9db754e1 100644 --- a/admin/tests/LeftAndMainTest.php +++ b/admin/tests/LeftAndMainTest.php @@ -24,7 +24,7 @@ class LeftAndMainTest extends FunctionalTest { 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' ); -} \ No newline at end of file +}