Lines Matching refs:environment
33 … $environment = new Environment($this->getMockBuilder('\Twig\Loader\LoaderInterface')->getMock());
34 $environment->addFunction(new TwigFunction('foo', 'foo', []));
35 $environment->addFunction(new TwigFunction('bar', 'bar', ['needs_environment' => true]));
36 $environment->addFunction(new TwigFunction('foofoo', 'foofoo', ['needs_context' => true]));
37 …$environment->addFunction(new TwigFunction('foobar', 'foobar', ['needs_environment' => true, 'need…
38 …$environment->addFunction(new TwigFunction('barbar', 'twig_tests_function_barbar', ['is_variadic' …
43 $tests[] = [$node, 'foo()', $environment];
46 $tests[] = [$node, 'foo("bar", "foobar")', $environment];
49 $tests[] = [$node, 'bar($this->env)', $environment];
52 $tests[] = [$node, 'bar($this->env, "bar")', $environment];
55 $tests[] = [$node, 'foofoo($context)', $environment];
58 $tests[] = [$node, 'foofoo($context, "bar")', $environment];
61 $tests[] = [$node, 'foobar($this->env, $context)', $environment];
64 $tests[] = [$node, 'foobar($this->env, $context, "bar")', $environment];
75 $tests[] = [$node, 'twig_tests_function_barbar()', $environment];
78 … $tests[] = [$node, 'twig_tests_function_barbar(null, null, ["foo" => "bar"])', $environment];
81 $tests[] = [$node, 'twig_tests_function_barbar(null, "bar")', $environment];
89 …ests[] = [$node, 'twig_tests_function_barbar("1", "2", [0 => "3", "foo" => "bar"])', $environment];