Merge "Fix testGetMap_twoValues() failures for sqlite"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 13 Apr 2018 22:42:03 +0000 (22:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 13 Apr 2018 22:42:03 +0000 (22:42 +0000)
includes/Storage/NameTableStore.php
tests/phpunit/includes/Storage/NameTableStoreTest.php

index 465f299..ebce3da 100644 (file)
@@ -321,7 +321,8 @@ class NameTableStore {
                                'name' => $this->nameField
                        ],
                        [],
-                       __METHOD__
+                       __METHOD__,
+                       [ 'ORDER BY' => 'id' ]
                );
 
                $assocArray = [];
index 5276a14..0cd164b 100644 (file)
@@ -257,7 +257,7 @@ class NameTableStoreTest extends MediaWikiTestCase {
                $store->getMap();
                $table = $store->getMap();
 
-               $expected = [ 2 => 'bar', 1 => 'foo' ];
+               $expected = [ 1 => 'foo', 2 => 'bar' ];
                $this->assertSame( $expected, $table );
                // Make sure the table returned is the same as the cached table
                $this->assertSame( $expected, TestingAccessWrapper::newFromObject( $store )->tableCache );