Change-Id: I181cb6f92ab1b10d87b1213a043a5f291149d094
* @return string of HTML representing a box.
*/
private static function messageBox( $html, $className, $heading = '' ) {
- if ( $heading ) {
+ if ( $heading !== '' ) {
$html = self::element( 'h2', [], $heading ) . $html;
}
return self::rawElement( 'div', [ 'class' => $className ], $html );
Html::errorBox( 'err', 'heading' ),
'<div class="errorbox"><h2>heading</h2>err</div>'
);
+ $this->assertEquals(
+ Html::errorBox( 'err', '0' ),
+ '<div class="errorbox"><h2>0</h2>err</div>'
+ );
}
/**