/**
* @covers ThrottledError
- * @author Adam Shorland
+ * @author Addshore
*/
class ThrottledErrorTest extends MediaWikiTestCase {
try {
throw new ThrottledError();
} catch ( ThrottledError $e ) {
+ ob_start();
$e->report();
- $this->assertTrue( true );
+ $text = ob_get_clean();
+ $this->assertContains( $e->getText(), $text );
}
}
private function getMockWgOut() {
- $mock = $this->getMockBuilder( 'OutputPage' )
+ $mock = $this->getMockBuilder( OutputPage::class )
->disableOriginalConstructor()
->getMock();
$mock->expects( $this->once() )