public function Twig_Tests_Node_SetTest::testConstructor in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/Node/SetTest.php \Twig_Tests_Node_SetTest::testConstructor()
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ Node/ SetTest.php, line 14
Class
Code
public function testConstructor() {
$names = new Twig_Node(array(
new Twig_Node_Expression_AssignName('foo', 1),
), array(), 1);
$values = new Twig_Node(array(
new Twig_Node_Expression_Constant('foo', 1),
), array(), 1);
$node = new Twig_Node_Set(false, $names, $values, 1);
$this
->assertEquals($names, $node
->getNode('names'));
$this
->assertEquals($values, $node
->getNode('values'));
$this
->assertFalse($node
->getAttribute('capture'));
}