You are here

public function Twig_Tests_Node_Expression_ArrayTest::testConstructor in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php \Twig_Tests_Node_Expression_ArrayTest::testConstructor()

File

vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php, line 14

Class

Twig_Tests_Node_Expression_ArrayTest

Code

public function testConstructor() {
  $elements = array(
    new Twig_Node_Expression_Constant('foo', 1),
    $foo = new Twig_Node_Expression_Constant('bar', 1),
  );
  $node = new Twig_Node_Expression_Array($elements, 1);
  $this
    ->assertEquals($foo, $node
    ->getNode(1));
}