htmlLang() public method

See also: Bolt\Twig\Handler\HtmlHandler::htmlLang()
public htmlLang ( )
Example #1
0
 public function testHtmlLang()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['html'] = $this->getMockHandler('HtmlHandler', 'htmlLang');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->htmlLang();
 }
Example #2
0
 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());
 }