htmlLang() публичный Метод

См. также: Bolt\Twig\Handler\HtmlHandler::htmlLang()
public htmlLang ( )
Пример #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();
 }
Пример #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());
 }