* @covers Html::expandAttributes
*/
public function testExpandAttributesForBooleans() {
- $this->assertEquals(
+ $this->assertSame(
'',
Html::expandAttributes( [ 'selected' => false ] ),
'Boolean attributes do not generates output when value is false'
);
- $this->assertEquals(
+ $this->assertSame(
'',
Html::expandAttributes( [ 'selected' => null ] ),
'Boolean attributes do not generates output when value is null'
'<div class="errorbox">err</div>'
);
$this->assertEquals(
- Html::errorBox( 'err', 'heading' ),
- '<div class="errorbox"><h2>heading</h2>err</div>'
+ Html::errorBox( 'err', 'heading', 'errorbox-custom-class' ),
+ '<div class="errorbox errorbox-custom-class"><h2>heading</h2>err</div>'
);
$this->assertEquals(
- Html::errorBox( 'err', '0' ),
+ Html::errorBox( 'err', '0', '' ),
'<div class="errorbox"><h2>0</h2>err</div>'
);
}