Clear DeferredUpdates state via setUp()
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 3 Nov 2014 21:40:49 +0000 (13:40 -0800)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 3 Nov 2014 21:43:53 +0000 (13:43 -0800)
commit49cfcf3715822b66c7cf3ab0f3771910ad8b69c1
tree7b5c4e5be85e499d8f383e511294e52efa08e9db
parent4564eec29f50ac82845fe7248d94023474a2162d
Clear DeferredUpdates state via setUp()

Best practices for phpunit say 'more setUp, less tearDown' which typically means
that tests are not responsible for cleaning up after themselves, rather tests
are in charge of setting the world up exactly as they expect it.  Part of this
expectation is that mediawiki does not maintain state between tests.

This patch clears DeferredUpdates from MediaWikiTestCase::setUp() because it has
internal global state.  This prevents state from leaking between test cases.

Bug: 72922
Change-Id: I57e6e89aa51c78bbf9d7f5151122b9e267d1a03e
tests/phpunit/MediaWikiTestCase.php