Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posibility to change indent character of rendering HTML attribute #137

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update Html.children.phpt
Aleš authored Jun 7, 2017
commit c6f708b709d0e49124bfd28468a449cfca65ad46
17 changes: 17 additions & 0 deletions tests/Utils/Html.children.phpt
Original file line number Diff line number Diff line change
@@ -30,6 +30,23 @@ test(function () { // add
', $el->render(2), 'indentation');
});

test(function () {
$el = Html::el('ul');
$el->create('li')->setText('one');
$el->addHtml(Html::el('li')->setText('two'))->class('hello');
Assert::same('<ul class="hello"><li>one</li><li>two</li></ul>', (string) $el);


// with indentation
Assert::match('
<ul class="hello">
<li>one</li>

<li>two</li>
</ul>
', $el->render(2, ' '), 'indentation');
});


test(function () {
$el = Html::el(NULL);