Remove exceptions on multiple * in dynamic names.

Per the finalized spec, these should be treated as lookup failures (i.e. rendered as empty strings) rather than exceptions.
This commit is contained in:
Justin Hileman
2022-08-23 09:11:52 -04:00
parent af4f8f7c0e
commit 93f824d09a
2 changed files with 0 additions and 34 deletions
@@ -24,34 +24,6 @@ class Mustache_Test_Functional_DynamicPartialsTest extends PHPUnit_Framework_Tes
));
}
public function getInvalidDynamicNamesExamples()
{
return array(
array('{{> **foo}}'),
array('{{> *foo.*bar}}'),
array('{{> foo.*bar}}'),
array('{{ *foo }}'),
array('{{{ *foo }}}'),
array('{{& *foo }}'),
array('{{# *foo }}{{/ *foo }}'),
array('{{^ *foo }}{{/ *foo }}'),
array('{{% FILTERS}}{{> *foo | *bar}}'),
array('{{% FILTERS}}{{> foo | *bar}}'),
array('{{% BLOCKS }}{{$ *foo }}{{/ *foo }}'),
);
}
/**
* @dataProvider getInvalidDynamicNamesExamples
* @expectedException Mustache_Exception_SyntaxException
* @expectedExceptionMessage Invalid dynamic name:
*/
public function testInvalidDynamicNamesExamples($template)
{
$this->mustache->render($template);
}
public function getValidDynamicNamesExamples()
{
// technically not all dynamic names, but also not invalid