Fix ChangeTagsTest failing on Postgres
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 15 Mar 2019 09:10:33 +0000 (10:10 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 15 Mar 2019 09:10:33 +0000 (10:10 +0100)
commit15111ac4c5cb1047e73159813d7c36f4739abd48
treef9badd7b4ac578a6dca2e96ade45da4234c663d8
parent43a0144346da4e6edbbadee0b7d9def53357bc10
Fix ChangeTagsTest failing on Postgres

The order of elements returned by the SELECT is not guaranteed. But the
assertEquals() can't know this. It does not know how to identify the two
objects, other than by their array index.

Using assertArrayEquals() would fix this. But I honestly don't like this
helper method. It is expensive, for example. So I went for an ORDER BY.

An example for this failure can be seen here:
https://integration.wikimedia.org/ci/job/mediawiki-quibble-vendor-postgres-php70-docker/2484/console

Change-Id: I284d13d21b9bc34270307e78430180d94fc6665e
tests/phpunit/includes/changetags/ChangeTagsTest.php