Esempio n. 1
0
 public function addTest(Twig_Test $test)
 {
     $this->tests[$test->getName()] = $test;
 }
Esempio n. 2
0
 /**
  * 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);
 }