public function Twig_Tests_LexerTest::testNameLabelForFunction

File

drupal/core/vendor/twig/twig/test/Twig/Tests/LexerTest.php, line 24

Class

Twig_Tests_LexerTest

Code

public function testNameLabelForFunction() {
  $template = '{{ ☃() }}';
  $lexer = new Twig_Lexer(new Twig_Environment());
  $stream = $lexer
    ->tokenize($template);
  $stream
    ->expect(Twig_Token::VAR_START_TYPE);
  $this
    ->assertSame('☃', $stream
    ->expect(Twig_Token::NAME_TYPE)
    ->getValue());
}