6 class TemplateParserTest
extends MediaWikiTestCase
{
8 protected $templateDir;
10 protected function setUp() {
13 $this->setMwGlobals( array(
14 'wgSecretKey' => 'foo',
15 'wgMemc' => new EmptyBagOStuff(),
18 $this->templateDir
= dirname( __DIR__
) . '/data/templates/';
22 * @dataProvider provideProcessTemplate
23 * @covers TemplateParser::processTemplate
24 * @covers TemplateParser::getTemplate
25 * @covers TemplateParser::getTemplateFilename
27 public function testProcessTemplate( $name, $args, $result, $exception = false ) {
29 $this->setExpectedException( $exception );
31 $tp = new TemplateParser( $this->templateDir
);
32 $this->assertEquals( $result, $tp->processTemplate( $name, $args ) );
35 public static function provideProcessTemplate() {
53 'UnexpectedValueException'
56 'nonexistenttemplate',
66 "Partial hello world!\n in here\n",