Add validation to prevent empty template_class_prefix.

Fixes #298
This commit is contained in:
Justin Hileman
2017-07-03 00:24:50 -07:00
parent 933554098a
commit 55e6ac81ba
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -158,6 +158,16 @@ class Mustache_Test_EngineTest extends Mustache_Test_FunctionalTestCase
$this->assertNotSame($mustache->getCache(), $mustache->getProtectedLambdaCache());
}
/**
* @expectedException Mustache_Exception_InvalidArgumentException
*/
public function testEmptyTemplatePrefixThrowsException()
{
new Mustache_Engine(array(
'template_class_prefix' => '',
));
}
/**
* @expectedException Mustache_Exception_InvalidArgumentException
* @dataProvider getBadEscapers