Skip to content

Commit

Permalink
[+]: added a test for the last error from `lHtmlDomHelper::mergeHtmlA…
Browse files Browse the repository at this point in the history
…ttributes()`
  • Loading branch information
voku committed Jul 3, 2024
1 parent 0a5d469 commit 143d60b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/SimpleHtmlHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ public function testMergeHtmlAttributes()

self::assertSame('<div class="foo foo2" id="bar" data-foo="bar" data-lall="foo"></div>', $result);
}

public function testMergeHtmlAttributesWithZeroValues()
{
$result = HtmlDomHelper::mergeHtmlAttributes(
'<input type="checkbox" class="foo" id="bar" data-foo="bar"></input>',
'class="foo2" data-lall=0 value="0"',
'#bar'
);

self::assertSame('<input type="checkbox" class="foo foo2" id="bar" data-foo="bar" data-lall="0" value="0">', $result);
}
}

0 comments on commit 143d60b

Please sign in to comment.