X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fexception%2FHttpErrorTest.php;h=90ccd1e551d0638bb39076a0cbb6c4d4e782e202;hb=1834ee3d8e2f6a8ef2067ee7925c4f561209b12f;hp=66fe90c955723e665b19ac4c39f0bde778848615;hpb=f1a890c34cebd8744bf3a6277734275fb975575a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/exception/HttpErrorTest.php b/tests/phpunit/includes/exception/HttpErrorTest.php index 66fe90c955..90ccd1e551 100644 --- a/tests/phpunit/includes/exception/HttpErrorTest.php +++ b/tests/phpunit/includes/exception/HttpErrorTest.php @@ -22,7 +22,7 @@ class HttpErrorTest extends MediaWikiTestCase { */ public function testGetHtml( array $expected, $content, $header ) { $httpError = new HttpError( 500, $content, $header ); - $errorHtml = $httpError->getHtml(); + $errorHtml = $httpError->getHTML(); foreach ( $expected as $key => $html ) { $this->assertContains( $html, $errorHtml, $key ); @@ -30,36 +30,34 @@ class HttpErrorTest extends MediaWikiTestCase { } public function getHtmlProvider() { - return array( - array( - array( + return [ + [ + [ 'head html' => 'Server Error 123', 'body html' => '

Server Error 123

' . '

a server error!

' - ), + ], 'a server error!', 'Server Error 123' - ), - array( - array( + ], + [ + [ 'head html' => 'loginerror', 'body html' => '

loginerror

' . '

suspicious-userlogout

' - ), + ], new RawMessage( 'suspicious-userlogout' ), new RawMessage( 'loginerror' ) - ), - array( - array( + ], + [ + [ 'head html' => 'Internal Server Error', 'body html' => '

Internal Server Error

' . '

a server error!

' - ), + ], 'a server error!', null - ) - ); + ] + ]; } - - }