You are here

public function Twig_Tests_Node_ImportTest::getTests in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php \Twig_Tests_Node_ImportTest::getTests()

Overrides Twig_Test_NodeTestCase::getTests

File

vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php, line 24

Class

Twig_Tests_Node_ImportTest

Code

public function getTests() {
  $tests = array();
  $macro = new Twig_Node_Expression_Constant('foo.twig', 1);
  $var = new Twig_Node_Expression_AssignName('macro', 1);
  $node = new Twig_Node_Import($macro, $var, 1);
  $tests[] = array(
    $node,
    <<<EOF
// line 1
\$context["macro"] = \$this->loadTemplate("foo.twig", null, 1);
EOF
,
  );
  return $tests;
}