Add more tests

This commit is contained in:
Fabien Potencier
2024-05-11 08:59:04 +02:00
parent d30b72c364
commit 55ae21493b
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,15 @@
--TEST--
"cache" tag
--TEMPLATE--
{% cache 'test_%s_%s'|format(10, 10000) ttl(36000) %}
{% set content %}
OK
{% endset %}
{% apply spaceless %}
{{ content }}
{% endapply %}
{% endcache %}
--DATA--
return []
--EXPECT--
OK
@@ -0,0 +1,15 @@
--TEST--
"cache" tag
--TEMPLATE--
{% extends "layout.twig" %}
{% block bar %}
{% cache "foo" %}
{%- block content %}FOO{% endblock %}
{% endcache %}
{% endblock %}
--TEMPLATE(layout.twig)--
{% block content %}{% endblock %}
--DATA--
return []
--EXPECT--
FOO