Files
Twig/tests/Fixtures/functions/cycle_empty_mapping.test

9 lines
228 B
Plaintext

--TEST--
"cycle" function returns an error on empty mappings
--TEMPLATE--
{{ cycle({}, 0) }}
--DATA--
return []
--EXCEPTION--
Twig\Error\RuntimeError: The "cycle" function expects a non-empty sequence in "index.twig" at line 2.