public function getTests() { if (null === $this->tests) { $this->tests = array(); foreach ($this->getExtensions() as $extension) { $this->tests = array_merge($this->tests, $extension->getTests()); } } return $this->tests; }
protected function getTestNodeClass(Twig_Environment $env, $name) { $testMap = $env->getTests(); if (isset($testMap[$name]) && $testMap[$name] instanceof Twig_Test_Node) { return $testMap[$name]->getClass(); } return 'Twig_Node_Expression_Test'; }