aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/exception/MWExceptionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/exception/MWExceptionTest.php')
-rw-r--r--tests/phpunit/includes/exception/MWExceptionTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/phpunit/includes/exception/MWExceptionTest.php b/tests/phpunit/includes/exception/MWExceptionTest.php
index d09009bbe311..481622cdf82d 100644
--- a/tests/phpunit/includes/exception/MWExceptionTest.php
+++ b/tests/phpunit/includes/exception/MWExceptionTest.php
@@ -24,8 +24,13 @@ class MWExceptionTest extends MediaWikiIntegrationTestCase {
* @covers MWException::useOutputPage
*/
public function testUseOutputPage( $expected, $langObj, $fullyInitialised, $outputPage ) {
+ if ( $langObj !== null ) {
+ $this->setUserLang( $langObj );
+ } else {
+ // Reset the global to unset
+ $this->setMwGlobals( 'wgLang', $langObj );
+ }
$this->setMwGlobals( [
- 'wgLang' => $langObj,
'wgFullyInitialised' => $fullyInitialised,
'wgOut' => $outputPage,
] );