public function Twig_Environment::getTest

Gets a test by name.

Parameters

string $name The test name:

Return value

Twig_Test|false A Twig_Test instance or false if the test does not exist

File

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

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getTest($name) {
  if (!$this->extensionInitialized) {
    $this
      ->initExtensions();
  }
  if (isset($this->tests[$name])) {
    return $this->tests[$name];
  }
  return false;
}