public function Twig_Tests_LexerTest::testStringWithEscapedDelimiter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/LexerTest.php \Twig_Tests_LexerTest::testStringWithEscapedDelimiter()
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ LexerTest.php, line 152
Class
Code
public function testStringWithEscapedDelimiter() {
$tests = array(
"{{ 'foo \\' bar' }}" => 'foo \' bar',
'{{ "foo \\" bar" }}' => 'foo " bar',
);
$lexer = new Twig_Lexer(new Twig_Environment($this
->getMock('Twig_LoaderInterface')));
foreach ($tests as $template => $expected) {
$stream = $lexer
->tokenize($template);
$stream
->expect(Twig_Token::VAR_START_TYPE);
$stream
->expect(Twig_Token::STRING_TYPE, $expected);
}
}