4 * @covers ThrottledError
7 class ThrottledErrorTest
extends MediaWikiTestCase
{
9 public function testExceptionSetsStatusCode() {
10 $this->setMwGlobals( 'wgOut', $this->getMockWgOut() );
12 throw new ThrottledError();
13 } catch ( ThrottledError
$e ) {
15 $this->assertTrue( true );
19 private function getMockWgOut() {
20 $mock = $this->getMockBuilder( 'OutputPage' )
21 ->disableOriginalConstructor()
23 $mock->expects( $this->once() )
24 ->method( 'setStatusCode' )