assertEquals($expr, $node->getNode('expr')); } public function getTests() { $tests = []; $expr = new ConstantExpression('This section is deprecated', 1); $node = new DeprecatedNode($expr, 1, 'deprecated'); $node->setTemplateName('foo.twig'); $tests[] = [$node, <<setTemplateName('foo.twig'); $tests[] = [$node, <<getMockBuilder('\Twig\Loader\LoaderInterface')->getMock()); $environment->addFunction(new TwigFunction('foo', 'foo', [])); $expr = new FunctionExpression('foo', new Node(), 1); $node = new DeprecatedNode($expr, 1, 'deprecated'); $node->setTemplateName('foo.twig'); $compiler = $this->getCompiler($environment); $varName = $compiler->getVarName(); $tests[] = [$node, <<