Clear test user registry between tests
authorAryeh Gregor <ayg@aryeh.name>
Mon, 12 Aug 2019 17:43:21 +0000 (20:43 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Wed, 14 Aug 2019 07:27:21 +0000 (10:27 +0300)
commit3458e332dae1bc07ddd8ee5461a6804a80803e54
tree6d4c1212e5519210234e2ec279334f2db43372a1
parentdbdbeb7af2a7f0ee00bdc4dfc1297edf0405a8fd
Clear test user registry between tests

Otherwise User members will wind up retaining stale references to
services. The more things move to services, the more state we need to
reset between tests to avoid subtle and confusing test failures!

TestUsers can't be created if the DB prefix is not either unittest_ or
ut_, which caused failures in RCFeedIntegrationTest.php with this change
now that it was trying to create a new TestUser. Fix is to set the
prefix to one of those two instead of empty.

Change-Id: I41f87e1acffe94361748ef4ab69c290de587e6be
tests/phpunit/MediaWikiIntegrationTestCase.php
tests/phpunit/includes/rcfeed/RCFeedIntegrationTest.php