14 'wgSecretKey' =>
'foo',
17 $this->templateDir = dirname( __DIR__ ) .
'/data/templates/';
28 $this->setExpectedException( $exception );
30 $tp =
new TemplateParser( $this->templateDir );
31 $this->assertEquals( $result, $tp->processTemplate( $name,
$args ) );
52 'UnexpectedValueException'
58 'UnexpectedValueException'
64 'UnexpectedValueException'
71 'UnexpectedValueException'
77 'UnexpectedValueException'
83 'UnexpectedValueException'
89 'UnexpectedValueException'
92 'nonexistenttemplate',
102 "Partial hello world!\n in here\n",
114 $tp =
new TemplateParser( $this->templateDir );
115 $data = [
'r' => [
'r' => [
'r' => [] ] ] ];
117 $tp->enableRecursivePartials(
true );
118 $this->assertEquals(
'rrr', $tp->processTemplate(
'recurse', $data ) );
120 $tp->enableRecursivePartials(
false );
121 $this->setExpectedException(
'Exception' );
122 $tp->processTemplate(
'recurse', $data );
testProcessTemplate( $name, $args, $result, $exception=false)
provideProcessTemplate TemplateParser::processTemplate TemplateParser::getTemplate TemplateParser::ge...
testEnableRecursivePartials()
static provideProcessTemplate()