assertEquals($foo, $node->getNode(1)); } /** * @covers Twig_Node_Expression_Array::compile * @dataProvider getTests */ public function testCompile($node, $source, $environment = null) { parent::testCompile($node, $source, $environment); } public function getTests() { $elements = array( new Twig_Node_Expression_Constant('foo', 0), new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('foo', 0), ); $node = new Twig_Node_Expression_Array($elements, 0); return array( array($node, 'array("foo" => "bar", "bar" => "foo")'), ); } }