Fix reset interwiki table between tests
authorPwirth <wirth@hallowelt.biz>
Mon, 6 Aug 2018 16:27:00 +0000 (16:27 +0000)
committerPwirth <wirth@hallowelt.biz>
Tue, 14 Aug 2018 05:08:02 +0000 (05:08 +0000)
commitbf28911864331877084f4f5fe2ba0ba7b8584cfe
tree6080e57268fef20dd5aa4aa2d7bec19e9247f0a0
parentd053a7baa7cbcb37e55fbbcb8613c53961b26b97
Fix reset interwiki table between tests

This fixes the following SQL error, when the interwikilinks table was
marked as used:
Fatal error: Uncaught exception 'Wikimedia\Rdbms\DBQueryError' with message 'A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: INSERT  INTO `unittest_interwiki` (1,2,3) VALUES ('Array','Array','Array')
Function: MediaWikiTestCase::resetDB

iterator_to_array on the result of the select of the interwiki table
returns an array with the first entry having the key 1. For
multi insert to work, the array must start on 0.
Change-Id: I3dc1be9e2f016709f451fe6e8d7cc60862c1ffea
tests/phpunit/MediaWikiTestCase.php