public getGlobals ( ) |
public function getGlobals()
{
return ['bolt_name' => null, 'bolt_version' => null, 'bolt_stable' => null, 'frontend' => null, 'backend' => null, 'async' => null, 'paths' => null, 'theme' => null, 'user' => null, 'users' => null, 'config' => null];
}
public function testGetGlobalsSafe() { $app = $this->getApp(); $request = Request::createFromGlobals(); $app['request'] = $request; $app['request_stack']->push($request); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, true); $result = $twig->getGlobals(); $this->assertArrayHasKey('config', $result); $this->assertNull($result['config']); $this->assertNull($result['users']); }