$this->assertEquals(
'<img/>',
Html::element( 'img', null, '' ),
- 'No close tag for short-tag elements'
+ 'Self-closing tag for short-tag elements'
);
$this->assertEquals(
Html::element( 'element', [], '' ),
'Close tag for empty element (array, string)'
);
-
- $this->assertEquals(
- '<img/>',
- Html::element( 'img', null, '' ),
- 'Self-closing tag for short-tag elements'
- );
}
public function dataXmlMimeType() {
Html::expandAttributes( [ 'selected' ] ),
'Boolean attributes have no value when value is true (passed as numerical array)'
);
-
- $this->assertEquals(
- ' selected=""',
- Html::expandAttributes( [ 'selected' => true ] ),
- 'Boolean attributes have empty string value when value is true'
- );
}
/**
'1x.png 1x, 1_5x.png 1.5x, 2x.png 2x',
'pixel depth keys may omit a trailing "x"'
],
+ [
+ [ '1' => 'small.png', '1.5' => 'large.png', '2' => 'large.png' ],
+ 'small.png 1x, large.png 1.5x',
+ 'omit larger duplicates'
+ ],
+ [
+ [ '1' => 'small.png', '2' => 'large.png', '1.5' => 'large.png' ],
+ 'small.png 1x, large.png 1.5x',
+ 'omit larger duplicates in irregular order'
+ ],
];
}