Skip to content

Commit

Permalink
improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 11, 2022
1 parent 8ef8d44 commit efb899d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/common/Compiler.samples.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,24 @@ Assert::match(
'<div> <a> </a></div>', // </a> is accepted
$latte->renderToString('<div n:if="1"> {if true}<a>{/if} </a></div>')
);

// tag name vs content
Assert::contains(
'escapeHtmlText(trim("a"))',
$latte->compile('{trim("a")}')
);

Assert::contains(
'escapeHtmlText(\trim("a"))',
$latte->compile('{\trim("a")}')
);

Assert::contains(
'escapeHtmlText(MyClass::foo)',
$latte->compile('{MyClass::foo}')
);

Assert::contains(
'escapeHtmlText(My\Class::foo)',
$latte->compile('{My\Class::foo}')
);

0 comments on commit efb899d

Please sign in to comment.