*/
public function testExpandAttributesSkipsNullAndFalse() {
- ### EMPTY ########
+ # ## EMPTY ########
$this->assertEmpty(
Html::expandAttributes( array( 'foo' => null ) ),
'skip keys with null value'
* @covers Html::expandAttributes
*/
public function testExpandAttributesVariousExpansions() {
- ### NOT EMPTY ####
+ # ## NOT EMPTY ####
$this->assertEquals(
' empty_string=""',
Html::expandAttributes( array( 'empty_string' => '' ) ),
* @covers Html::expandAttributes
*/
public function testExpandAttributesListValueAttributes() {
- ### STRING VALUES
+ # ## STRING VALUES
$this->assertEquals(
' class="redundant spaces here"',
Html::expandAttributes( array( 'class' => ' redundant spaces here ' ) ),
Html::expandAttributes( array( 'class' => 'foo bar foo bar bar' ) ),
'Normalization should remove duplicates in string-lists'
);
- ### "EMPTY" ARRAY VALUES
+ # ## "EMPTY" ARRAY VALUES
$this->assertEquals(
' class=""',
Html::expandAttributes( array( 'class' => array() ) ),
Html::expandAttributes( array( 'class' => array( null, '', ' ', ' ' ) ) ),
'Array with null, empty string and spaces'
);
- ### NON-EMPTY ARRAY VALUES
+ # ## NON-EMPTY ARRAY VALUES
$this->assertEquals(
' class="foo bar"',
Html::expandAttributes( array( 'class' => array(
# Will be mapped to Html::element()
$cases = array();
- ### Generic cases, match $attribDefault static array
+ # ## Generic cases, match $attribDefault static array
$cases[] = array( '<area>',
'area', array( 'shape' => 'rect' )
);
'textarea', array( 'wrap' => 'soft' )
);
- ### SPECIFIC CASES
+ # ## SPECIFIC CASES
# <link type="text/css">
$cases[] = array( '<link>',