starting triple braces without ending triple braces throws an error - previously this was swallowing an additional character

This commit is contained in:
steve
2014-06-18 16:53:34 -07:00
parent 77f98ad864
commit 868b5b49eb
2 changed files with 30 additions and 8 deletions
+11
View File
@@ -24,6 +24,17 @@ class Mustache_Test_TokenizerTest extends PHPUnit_Framework_TestCase
$this->assertSame($expected, $tokenizer->scan($text, $delimiters));
}
/**
* @expectedException Mustache_Exception_SyntaxException
*/
public function testUnevenBracesThrowExceptions()
{
$tokenizer = new Mustache_Tokenizer;
$text = "{{{ name }}";
$tokenizer->scan($text, null);
}
public function getTokens()
{
return array(