public function Twig_Environment::getTests

Gets the registered Tests.

Return value

Twig_TestInterface[] An array of Twig_TestInterface instances

File

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

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getTests() {
  if (null === $this->tests) {
    foreach ($this
      ->getExtensions() as $extension) {
      foreach ($extension
        ->getTests() as $name => $test) {
        $this
          ->addTest($name, $test);
      }
    }
    $this->tests = $this->staging['tests'];
  }
  return $this->tests;
}