public function addGlobal($name, $value)
{
$this->createTwig();
$this->twig->addGlobal($name, $value);
}
public function testAddGlobal() { $obj = new Twig(['paths' => __DIR__ . '/../templates/']); $obj->addGlobal('sitename', 'Twig Test Site'); $output = $obj->render('global'); $this->assertEquals('<title>Twig Test Site</title>' . "\n", $output); }