15 'wgSecretKey' =>
'foo',
18 $this->templateDir = dirname( __DIR__ ) .
'/data/templates/';
26 $this->setExpectedException( $exception );
28 $tp =
new TemplateParser( $this->templateDir );
29 $this->assertEquals( $result, $tp->processTemplate( $name,
$args ) );
50 'UnexpectedValueException'
56 'UnexpectedValueException'
62 'UnexpectedValueException'
69 'UnexpectedValueException'
75 'UnexpectedValueException'
81 'UnexpectedValueException'
87 'UnexpectedValueException'
90 'nonexistenttemplate',
100 "Partial hello world!\n in here\n",
112 $tp =
new TemplateParser( $this->templateDir );
113 $data = [
'r' => [
'r' => [
'r' => [] ] ] ];
115 $tp->enableRecursivePartials(
true );
116 $this->assertEquals(
'rrr', $tp->processTemplate(
'recurse', $data ) );
118 $tp->enableRecursivePartials(
false );
119 $this->setExpectedException( Exception::class );
120 $tp->processTemplate(
'recurse', $data );
Templates TemplateParser.
testProcessTemplate( $name, $args, $result, $exception=false)
provideProcessTemplate
testEnableRecursivePartials()
static provideProcessTemplate()