Fix global objects and singletons in NewParserTest
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 4 May 2013 12:21:39 +0000 (14:21 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 10 May 2013 20:47:35 +0000 (20:47 +0000)
commit00f891ce9084fd9f700c5bee553c549be394bf3b
tree7141ddcc27a842603d4f0d638a30c3a800101f3b
parente281c6f699ef154a7c4d6f0ae0ebf1cead7ca3e3
Fix global objects and singletons in NewParserTest

- Don't set $wgMemc, $parserMemc and $messageMemc on each test,
  the correct values for $wgMainCacheType and such are already set
  in phpunit.php, so those objects are already the good ones
- Only destroy RepoGroup and FileBackendGroup once before starting
  the tests instead of two
- No need to clear the MessageCache in addDBData(), it is already
  destroyed in setupGlobals() (also avoids creating an object on
  some tests to only call clear() on it)
- Group singleton cleanup after the test in tearDown()

Change-Id: Ib2d6522019160f63f3f968e69940413a1def2f8b
tests/phpunit/includes/parser/NewParserTest.php