X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fexception%2FErrorPageErrorTest.php;h=49d454e8d94115cba4735ba4eb8f7f3fec1b6590;hp=71398e3f64cf5ee3f16fc7a239246d7e9070f597;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=2a1fcd27c19913394c179cbe8be1a9e981d7f81b 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();