mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 01:16:52 +00:00
Add more tests
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user