X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fexception%2FErrorPageErrorTest.php;h=49d454e8d94115cba4735ba4eb8f7f3fec1b6590;hb=c1c0d243522d477799bb5ca325a100fa6a86a7fd;hp=d045268b6bf921f465378602357d2da556712ce7;hpb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/exception/ErrorPageErrorTest.php b/tests/phpunit/includes/exception/ErrorPageErrorTest.php index d045268b6b..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() ) @@ -22,7 +22,7 @@ class ErrorPageErrorTest extends MediaWikiTestCase { public function testConstruction() { $mockMessage = $this->getMockMessage(); $title = 'Foo'; - $params = array( 'Baz' ); + $params = [ 'Baz' ]; $e = new ErrorPageError( $title, $mockMessage, $params ); $this->assertEquals( $title, $e->title ); $this->assertEquals( $mockMessage, $e->msg ); @@ -32,9 +32,9 @@ class ErrorPageErrorTest extends MediaWikiTestCase { public function testReport() { $mockMessage = $this->getMockMessage(); $title = 'Foo'; - $params = array( 'Baz' ); + $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();