diff options
author | Derick Alangi <alangiderick@gmail.com> | 2022-07-20 13:42:41 +0100 |
---|---|---|
committer | Derick Alangi <alangiderick@gmail.com> | 2022-07-23 05:53:49 +0100 |
commit | 6e5f2d0822a1fce64bb16c1bce51ea2d727263bb (patch) | |
tree | 9f5f5707fda36bf1fa0a2e35c9a0dcd08cfd4931 /tests/phpunit/includes/content/JavaScriptContentHandlerTest.php | |
parent | 8cb010b2211fa97e00cce2d06bc41488915742f1 (diff) | |
download | mediawikicore-6e5f2d0822a1fce64bb16c1bce51ea2d727263bb.tar.gz mediawikicore-6e5f2d0822a1fce64bb16c1bce51ea2d727263bb.zip |
tests: Migrate `setMwGlobals()` to `overrideConfigValue(s)()`
Directories covered are:
- tests/phpunit/includes/cache/
- tests/phpunit/includes/changes/
- tests/phpunit/includes/changetags/
- tests/phpunit/includes/config/
- tests/phpunit/includes/content/
- tests/phpunit/includes/debug/
- tests/phpunit/includes/deferred/
- tests/phpunit/includes/diff/
Change-Id: I3a1f586867db7d57b177e13a03a4593f7eed09f4
Diffstat (limited to 'tests/phpunit/includes/content/JavaScriptContentHandlerTest.php')
-rw-r--r-- | tests/phpunit/includes/content/JavaScriptContentHandlerTest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php index c76f5a07a261..bdae210cebb1 100644 --- a/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php +++ b/tests/phpunit/includes/content/JavaScriptContentHandlerTest.php @@ -1,5 +1,7 @@ <?php +use MediaWiki\MainConfigNames; + class JavaScriptContentHandlerTest extends MediaWikiLangTestCase { /** @@ -7,9 +9,9 @@ class JavaScriptContentHandlerTest extends MediaWikiLangTestCase { * @covers JavaScriptContentHandler::makeRedirectContent */ public function testMakeRedirectContent( $title, $expected ) { - $this->setMwGlobals( [ - 'wgServer' => '//example.org', - 'wgScript' => '/w/index.php', + $this->overrideConfigValues( [ + MainConfigNames::Server => '//example.org', + MainConfigNames::Script => '/w/index.php', ] ); $ch = new JavaScriptContentHandler(); $content = $ch->makeRedirectContent( Title::newFromText( $title ) ); |