From: jenkins-bot Date: Fri, 13 Apr 2018 22:42:03 +0000 (+0000) Subject: Merge "Fix testGetMap_twoValues() failures for sqlite" X-Git-Tag: 1.31.0-rc.0~77 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=46bdd1a491513d9a3d48bdb75c074e2e177c3b3f;hp=598ea1fe0b6803d3972b1b97a79a4db7358e1a8a Merge "Fix testGetMap_twoValues() failures for sqlite" --- diff --git a/includes/Storage/NameTableStore.php b/includes/Storage/NameTableStore.php index 465f299770..ebce3da965 100644 --- a/includes/Storage/NameTableStore.php +++ b/includes/Storage/NameTableStore.php @@ -321,7 +321,8 @@ class NameTableStore { 'name' => $this->nameField ], [], - __METHOD__ + __METHOD__, + [ 'ORDER BY' => 'id' ] ); $assocArray = []; diff --git a/tests/phpunit/includes/Storage/NameTableStoreTest.php b/tests/phpunit/includes/Storage/NameTableStoreTest.php index 5276a140f6..0cd164b76f 100644 --- a/tests/phpunit/includes/Storage/NameTableStoreTest.php +++ b/tests/phpunit/includes/Storage/NameTableStoreTest.php @@ -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 );