class ErrorPageErrorTest extends MediaWikiTestCase {
private function getMockMessage() {
- $mockMessage = $this->getMockBuilder( 'Message' )
+ $mockMessage = $this->getMockBuilder( Message::class )
->disableOriginalConstructor()
->getMock();
$mockMessage->expects( $this->once() )
$title = 'Foo';
$params = [ 'Baz' ];
- $mock = $this->getMockBuilder( 'OutputPage' )
+ $mock = $this->getMockBuilder( OutputPage::class )
->disableOriginalConstructor()
->getMock();
$mock->expects( $this->once() )
$mock->expects( $this->once() )
->method( 'output' );
$this->setMwGlobals( 'wgOut', $mock );
+ $this->setMwGlobals( 'wgCommandLineMode', false );
$e = new ErrorPageError( $title, $mockMessage, $params );
$e->report();