mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
21 lines
558 B
Plaintext
21 lines
558 B
Plaintext
--TEST--
|
|
"block" function with undefined block on deep inheritance
|
|
--TEMPLATE--
|
|
{% extends "base.twig" %}
|
|
{% block foo %}
|
|
{{ parent() }}
|
|
{{ block('unknown') }}
|
|
{{ block('bar') }}
|
|
{% endblock %}
|
|
--TEMPLATE(base.twig)--
|
|
{% extends "layout.twig" %}
|
|
{% block foo %}Foo{% endblock %}
|
|
{% block bar %}Bar{% endblock %}
|
|
--TEMPLATE(layout.twig)--
|
|
{% block foo %}Foo{% endblock %}
|
|
{% block bar %}Bar{% endblock %}
|
|
--DATA--
|
|
return []
|
|
--EXCEPTION--
|
|
Twig\Error\RuntimeError: Block "unknown" on template "layout.twig" does not exist in "index.twig" at line 5.
|