6 class TemplateParserTest
extends MediaWikiTestCase
{
8 * @covers TemplateParser::compile
10 public function testTemplateCompilation() {
12 '/^<\?php return function/',
13 TemplateParser
::compile( "test" ),
14 'compile a simple mustache template'
19 * @covers TemplateParser::compile
21 public function testTemplateCompilationWithVariable() {
23 '/return \'\'\.htmlentities\(\(string\)\(\(isset\(\$in\[\'value\'\]\) && '
24 . 'is_array\(\$in\)\) \? \$in\[\'value\'\] : null\), ENT_QUOTES, '
25 . '\'UTF-8\'\)\.\'\';/',
26 TemplateParser
::compile( "{{value}}" ),
27 'compile a mustache template with an escaped variable'