public function testHtmlLang() { $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $handlers['html'] = $this->getMockHandler('HtmlHandler', 'htmlLang'); $twig = new TwigExtension($app, $handlers, true); $twig->htmlLang(); }
public function testHtmlLang() { // Default Locale $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, false); $this->assertEquals('en-GB', $twig->htmlLang()); // Custom Locale de_DE $app = $this->getApp(); $app['locale'] = 'de_DE'; $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, false); $this->assertEquals('de-DE', $twig->htmlLang()); }