aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/MediaWikiUnitTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/MediaWikiUnitTestCase.php')
-rw-r--r--tests/phpunit/MediaWikiUnitTestCase.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/phpunit/MediaWikiUnitTestCase.php b/tests/phpunit/MediaWikiUnitTestCase.php
deleted file mode 100644
index 9ecc0431871f..000000000000
--- a/tests/phpunit/MediaWikiUnitTestCase.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-use MediaWiki\MediaWikiServices;
-use PHPUnit\Framework\TestCase;
-
-abstract class MediaWikiUnitTestCase extends TestCase {
- use MediaWikiCoversValidator;
- use PHPUnit4And6Compat;
-
- /** @var MediaWikiServices $mwServicesBackup */
- private $mwServicesBackup;
-
- /**
- * Replace global MediaWiki service locator with a clone that has the given overrides applied
- * @param callable[] $overrides map of service names to instantiators
- * @throws MWException
- */
- protected function overrideMwServices( array $overrides ) {
- $services = clone MediaWikiServices::getInstance();
-
- foreach ( $overrides as $serviceName => $factory ) {
- $services->disableService( $serviceName );
- $services->redefineService( $serviceName, $factory );
- }
-
- $this->mwServicesBackup = MediaWikiServices::forceGlobalInstance( $services );
- }
-
- protected function tearDown() {
- parent::tearDown();
-
- if ( $this->mwServicesBackup ) {
- MediaWikiServices::forceGlobalInstance( $this->mwServicesBackup );
- }
- }
-}