ChangeTagsTest: Mark tables as "used" to avoid ID reuse
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 9 Oct 2018 19:41:25 +0000 (15:41 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 9 Oct 2018 19:52:05 +0000 (15:52 -0400)
commit9f60798508052a90b5c20c35d4af1450c5e7b17e
tree2ecb2a184a09baa667a27faf83c3ccebc47b840f
parent2eef43c257123e8eea083a4c823dfcbdeca3ac57
ChangeTagsTest: Mark tables as "used" to avoid ID reuse

If ChangeTags::updateTags() isn't passed all three of $rc_id, $rev_id,
and $log_id, it attempts to look up proper values from the subset that
is passed.

Some of the tests in ChangeTagsTest blindly use certain IDs, expecting
them to either not exist in the relevant tables or at least to be sane
(e.g. the same log_id isn't used on multiple rc_id rows). Depending on
the exact behavior of previous tests, this expectation may not hold.

The simple fix is to just mark the relevant tables as "used" by
ChangeTagsTest so MediaWikiTestCase will truncate them.

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