public function Twig_Tests_LexerTest::testStringWithEscapedInterpolation

File

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

Class

Twig_Tests_LexerTest

Code

public function testStringWithEscapedInterpolation() {
  $template = '{{ "bar \\#{baz+1}" }}';
  $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+1}');
  $stream
    ->expect(Twig_Token::VAR_END_TYPE);
}