public function addTest(Twig_Test $test) { $this->tests[$test->getName()] = $test; }
/** * Registers a Test. * * @param Twig_Test $test A Twig_Test instance */ public function addTest(Twig_Test $test) { if ($this->extensionInitialized) { throw new LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName())); } $this->staging->addTest($test); }