Skip to content

Commit aabe202

Browse files
author
Bauffman
committed
Add test for non existing tags.
1 parent 71573ae commit aabe202

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Tests/CompilerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,13 @@ public function testCompileTextToken()
5151
$compiler->write();
5252
$this->assertTrue(true);
5353
}
54+
55+
/**
56+
* @expectedException Spoon\Template\SyntaxError
57+
*/
58+
public function testNonExistingTag()
59+
{
60+
$compiler = new Compiler($this->template, $this->path . '/no_such_tag.tpl');
61+
$compiler->write();
62+
}
5463
}

Tests/templates/no_such_tag.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This template is used to test for template tags
2+
that don't exist.
3+
4+
{% foobar %}

0 commit comments

Comments
 (0)