Skip to content

Commit 36805db

Browse files
author
Bauffman
committed
Add test for variable template token.
1 parent de470c1 commit 36805db

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Tests/CompilerTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,11 @@ public function testCompileBlockToken()
6767
$compiler->write();
6868
$this->assertTrue(true);
6969
}
70+
71+
public function testCompileVariableToken()
72+
{
73+
$compiler = new Compiler($this->template, $this->path . '/variable_token.tpl');
74+
$compiler->write();
75+
$this->assertTrue(true);
76+
}
7077
}

Tests/templates/variable_token.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This file is used to test the compilation of
2+
variable tokens.
3+
4+
{$name}
5+
{$name|length}
6+
{$users|join(',', 'date')}

0 commit comments

Comments
 (0)