mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Refactoring Fenom\Template::compile: Removed goto, $from
Fixed issues with templates '{if 0}none{/if} literal: { $a}{$a}{ $a} end' '{* '
This commit is contained in:
@@ -14,6 +14,10 @@ class CommentTest extends TestCase {
|
||||
$this->assertRender("before {*{{$tpl_val}}*} after", "before after");
|
||||
}
|
||||
|
||||
public function testError() {
|
||||
$this->execError('{* ', 'Fenom\CompileException', "Unclosed comment block in line");
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerScalars
|
||||
*/
|
||||
|
@@ -448,6 +448,7 @@ class TemplateTest extends TestCase {
|
||||
array('{if 0}none{/if} literal: {$a} end', $a, 'literal: lit. A end'),
|
||||
array('{if 0}none{/if} literal:{ignore} {$a} {/ignore} end', $a, 'literal: {$a} end'),
|
||||
array('{if 0}none{/if} literal: { $a} end', $a, 'literal: { $a} end'),
|
||||
array('{if 0}none{/if} literal: { $a}{$a}{ $a} end', $a, 'literal: { $a}lit. A{ $a} end'),
|
||||
array('{if 0}none{/if} literal: {
|
||||
$a} end', $a, 'literal: { $a} end'),
|
||||
array('{if 0}none{/if}literal: function () { return 1; } end', $a, 'literal: function () { return 1; } end')
|
||||
|
Reference in New Issue
Block a user