@covers Twig_Node_Include::__construct
public function testConstructor() {
$expr = new Twig_Node_Expression_Constant('foo.twig', 0);
$node = new Twig_Node_Include($expr, null, false, false, 0);
$this
->assertEquals(null, $node
->getNode('variables'));
$this
->assertEquals($expr, $node
->getNode('expr'));
$this
->assertFalse($node
->getAttribute('only'));
$vars = new Twig_Node_Expression_Array(array(
new Twig_Node_Expression_Constant('foo', 0),
new Twig_Node_Expression_Constant(true, 0),
), 0);
$node = new Twig_Node_Include($expr, $vars, true, false, 0);
$this
->assertEquals($vars, $node
->getNode('variables'));
$this
->assertTrue($node
->getAttribute('only'));
}