Reset services before every test
[lhc/web/wiklou.git] / tests / phpunit / phpunit.php
index 7cf042d..b1cca4a 100755 (executable)
@@ -29,6 +29,7 @@ class PHPUnitMaintClass extends Maintenance {
 
        public function __construct() {
                parent::__construct();
+               $this->setAllowUnregisteredOptions( true );
                $this->addOption(
                        'with-phpunitclass',
                        'Class name of the PHPUnit entry point to use',
@@ -128,9 +129,6 @@ class PHPUnitMaintClass extends Maintenance {
                        'Using HHVM ' . HHVM_VERSION . ' (' . PHP_VERSION . ")\n" :
                        'Using PHP ' . PHP_VERSION . "\n";
 
-               // Prepare global services for unit tests.
-               MediaWikiTestCase::prepareServices( new GlobalVarConfig() );
-
                $phpUnitClass::main();
        }