protected function getParent($context, $parents)
{
- return call_user_func($parents[0], $context, array_slice($parents, 0));
+ return call_user_func($parents[0], $context, array_slice($parents, 1));
}
public function pushBlocks($blocks)
--- /dev/null
+--TEST--
+"extends" tag
+--TEMPLATE--
+{% extends "layout.twig" %}{% block content %}{% parent %}index {% endblock %}
+--TEMPLATE(layout.twig)--
+{% extends "base.twig" %}{% block content %}{% parent %}layout {% endblock %}
+--TEMPLATE(base.twig)--
+{% block content %}base {% endblock %}
+--DATA--
+return array()
+--EXPECT--
+base layout index