Closed AmolKumarGupta closed 8 months ago
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Fixed issues |
Enhancement of the ul()
and ol()
methods in the Html
class
The ul()
and ol()
methods within the Html
class now have an additional functionality - they can accept an array of attributes. These attributes are added to the generated unordered list (<ul>
) and ordered list (<ol>
) HTML tags respectively. If attributes are provided in the function, a modified instance of Ul
and Ol
classes are returned with the attributes included in the tag.
Test cases to validate the new functionality
Functional validation of new enhancement has been undertaken in HtmlTest.php
. These validation checks include making sure that the methods return proper <ul>
and <ol>
HTML tag structures when provided with an 'id' attribute. Further tests validate the complete HTML structures with list items ('
For instance, a test is performed to verify if Html::ul(['id' => 'main'])->items(Html::li('item 1'))->render()
produces an 'unordered list' HTML tag, with id
attribute as 'main' and includes a 'list item' HTML tag with the content as 'item 1'. Similar tests are performed for 'ordered list' HTML tags with 'id' attribute and content provided.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
1657ad3
) 100.00% compared to head (c01c2b8
) 100.00%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@AmolKumarGupta Thank you 👍