19 require_once __DIR__.
'/SimpleTokenParser.php';
33 $template = $twig->loadTemplate(
'template');
37 if (
false === $exception) {
38 $this->fail(
'Exception not expected');
40 $this->assertEquals($exception, get_class($e));
45 if (
false !== $exception) {
46 $this->fail(sprintf(
'Exception "%s" expected', $exception));
50 $this->assertEquals(
$output, $actual);
57 array(
'foo1',
'',
'{% foo1 %}',
'|',
false),
58 array(
'foo2',
'',
'{% foo2 "bar" %}',
'|',
'Twig_Error_Syntax'),
59 array(
'foo3',
'<foo>',
'{% foo3 "bar" %}',
'|bar|',
false),
60 array(
'foo4',
'<foo>',
'{% foo4 1 + 2 %}',
'|3|',
false),
61 array(
'foo5',
'<foo:expression>',
'{% foo5 1 + 2 %}',
'|3|',
false),
62 array(
'foo6',
'<foo:array>',
'{% foo6 1 + 2 %}',
'|3|',
'Twig_Error_Syntax'),
63 array(
'foo7',
'<foo>',
'{% foo7 %}',
'|3|',
'Twig_Error_Syntax'),
64 array(
'foo8',
'<foo:array>',
'{% foo8 [1, 2] %}',
"|int(0)\nint(1)\nint(1)\nint(2)\n|",
false),
65 array(
'foo9',
'<foo> with <bar>',
'{% foo9 "bar" with "foobar" %}',
'|bar|with|foobar|',
false),
66 array(
'foo10',
'<foo> [with <bar>]',
'{% foo10 "bar" with "foobar" %}',
'|bar|with|foobar|',
false),
67 array(
'foo11',
'<foo> [with <bar>]',
'{% foo11 "bar" %}',
'|bar|',
false),
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
Create styles array
The data for the language used.
testGrammar($tag, $grammar, $template, $output, $exception)
getTests
Stores the Twig configuration.
Loads a template from an array.
if(function_exists('posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag