public function Twig_Environment::addTest

Registers a Test.

Parameters

string $name The test name:

Twig_TestInterface $test A Twig_TestInterface instance:

1 call to Twig_Environment::addTest()
Twig_Environment::getTests in drupal/core/vendor/twig/twig/lib/Twig/Environment.php
Gets the registered Tests.

File

drupal/core/vendor/twig/twig/lib/Twig/Environment.php, line 862

Class

Twig_Environment
Stores the Twig configuration.

Code

public function addTest($name, Twig_TestInterface $test) {
  $this->staging['tests'][$name] = $test;
  $this->tests = null;
}