Merge "Title: Refactor JS/CSS page handling to be more sane"
[lhc/web/wiklou.git] / tests / phpunit / includes / exception / ThrottledErrorTest.php
index a1cf84b..5214b6d 100644 (file)
@@ -2,7 +2,7 @@
 
 /**
  * @covers ThrottledError
- * @author Adam Shorland
+ * @author Addshore
  */
 class ThrottledErrorTest extends MediaWikiTestCase {
 
@@ -11,13 +11,15 @@ 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() )