3 * @covers BadTitleError
6 class BadTitleErrorTest
extends MediaWikiTestCase
{
8 public function testExceptionSetsStatusCode() {
9 $this->setMwGlobals( 'wgOut', $this->getMockWgOut() );
11 throw new BadTitleError();
12 } catch ( BadTitleError
$e ) {
14 $this->assertTrue( true );
18 private function getMockWgOut() {
19 $mock = $this->getMockBuilder( 'OutputPage' )
20 ->disableOriginalConstructor()
22 $mock->expects( $this->once() )
23 ->method( 'setStatusCode' )