Skip to content

Commit 0dd5571

Browse files
committed
tests: added n:snippet n:foreach test
1 parent 8f09d35 commit 0dd5571

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/Bridges.Latte/UIMacros.snippet3.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ EOD
4040
<p n:snippet="abc">hello</p>
4141
EOD
4242
, $params));
43+
44+
45+
Assert::error(function () use ($latte) {
46+
$latte->compile('<p n:snippet="abc" n:foreach="$items as $item">hello</p>');
47+
}, E_USER_WARNING, 'Combination of n:snippet with n:foreach is invalid, use n:inner-foreach.');

0 commit comments

Comments
 (0)