X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fexception%2FErrorPageErrorTest.php;h=49d454e8d94115cba4735ba4eb8f7f3fec1b6590;hb=c1c0d243522d477799bb5ca325a100fa6a86a7fd;hp=71398e3f64cf5ee3f16fc7a239246d7e9070f597;hpb=601519ee36462faabacf4547c9aefaf7e8726476;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/exception/ErrorPageErrorTest.php b/tests/phpunit/includes/exception/ErrorPageErrorTest.php index 71398e3f64..49d454e8d9 100644 --- a/tests/phpunit/includes/exception/ErrorPageErrorTest.php +++ b/tests/phpunit/includes/exception/ErrorPageErrorTest.php @@ -7,7 +7,7 @@ class ErrorPageErrorTest extends MediaWikiTestCase { private function getMockMessage() { - $mockMessage = $this->getMockBuilder( 'Message' ) + $mockMessage = $this->getMockBuilder( Message::class ) ->disableOriginalConstructor() ->getMock(); $mockMessage->expects( $this->once() ) @@ -34,7 +34,7 @@ class ErrorPageErrorTest extends MediaWikiTestCase { $title = 'Foo'; $params = [ 'Baz' ]; - $mock = $this->getMockBuilder( 'OutputPage' ) + $mock = $this->getMockBuilder( OutputPage::class ) ->disableOriginalConstructor() ->getMock(); $mock->expects( $this->once() ) @@ -43,6 +43,7 @@ class ErrorPageErrorTest extends MediaWikiTestCase { $mock->expects( $this->once() ) ->method( 'output' ); $this->setMwGlobals( 'wgOut', $mock ); + $this->setMwGlobals( 'wgCommandLineMode', false ); $e = new ErrorPageError( $title, $mockMessage, $params ); $e->report();