11 $httpError =
new HttpError( 500,
'server error!' );
12 $this->assertFalse( $httpError->isLoggable(),
'http error is not loggable' );
16 $httpError =
new HttpError( 500,
'server error!' );
17 $this->assertEquals( 500, $httpError->getStatusCode() );
25 $errorHtml = $httpError->getHTML();
27 foreach ( $expected as $key =>
$html ) {
28 $this->assertContains(
$html, $errorHtml, $key );
36 'head html' =>
'<head><title>Server Error 123</title></head>',
37 'body html' =>
'<body><h1>Server Error 123</h1>'
38 .
'<p>a server error!</p></body>'
45 'head html' =>
'<head><title>loginerror</title></head>',
46 'body html' =>
'<body><h1>loginerror</h1>'
47 .
'<p>suspicious-userlogout</p></body>'
54 'head html' =>
'<html><head><title>Internal Server Error</title></head>',
55 'body html' =>
'<body><h1>Internal Server Error</h1>'
56 .
'<p>a server error!</p></body></html>'
testGetHtml(array $expected, $content, $header)
getHtmlProvider
Show an error that looks like an HTTP server error.
Variant of the Message class.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html