From: Aaron Schulz Date: Fri, 13 Apr 2018 21:16:39 +0000 (-0700) Subject: Fix testGetMap_twoValues() failures for sqlite X-Git-Tag: 1.31.0-rc.0~77^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%22%24lasturl/%7B%24admin_url%7Dmembres/cotisations/gestion/%40%20%27info_date_publication_anterieure%27%20=%3E%20%27Previously%20published%20on:%27%2C%20%27info_date_referencement%27%20=%3E%20%27THIS%20SITE%20REFERENCED%20ON:%27%2C%20%27info_derniere_etape%27%20=%3E%20%27Done%21%27%2C-%27info_derniers_articles_publies%27%20=%3E%20%27Your%20most%20recently%20published%20articles%27%2C-%27info_desactiver_messagerie_personnelle%27%20=%3E%20%27You%20can%20enable%20or%20disable%20your%20personal%20messaging%20on%20this%20site.%27%2C%20%27info_descriptif%27%20=%3E%20%27Description:%27%2C%20%27info_desinstaller_plugin%27%20=%3E%20%27%20deactivates%20the%20plugin%20and%20deletes%20the%20data%27%2C%20%27info_discussion_cours%27%20=%3E%20%27Current%20discussions%27%2C%40%40%20-332%2C7%20%20284%2C6%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=3b58b6d14388fe9b534ab72f9cd0e4d0014fefdd;p=lhc%2Fweb%2Fwiklou.git Fix testGetMap_twoValues() failures for sqlite Change-Id: I3f42208d8e42ba923d4b08bb7efe15f871165899 --- 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 );