public function Twig_Tests_LexerTest::testStringWithHash

File

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

Class

Twig_Tests_LexerTest

Code

public function testStringWithHash() {
  $template = '{{ "bar # baz" }}';
  $lexer = new Twig_Lexer(new Twig_Environment());
  $stream = $lexer
    ->tokenize($template);
  $stream
    ->expect(Twig_Token::VAR_START_TYPE);
  $stream
    ->expect(Twig_Token::STRING_TYPE, 'bar # baz');
  $stream
    ->expect(Twig_Token::VAR_END_TYPE);
}