protected function setUp() {
parent::setUp();
- $this->setMwGlobals( array(
+ $this->setMwGlobals( [
'wgSecretKey' => 'foo',
- 'wgMemc' => new EmptyBagOStuff(),
- ) );
+ ] );
$this->templateDir = dirname( __DIR__ ) . '/data/templates/';
}
}
public static function provideProcessTemplate() {
- return array(
- array(
+ return [
+ [
'foobar',
- array(),
+ [],
"hello world!\n"
- ),
- array(
+ ],
+ [
'foobar_args',
- array(
+ [
'planet' => 'world',
- ),
+ ],
"hello world!\n",
- ),
- array(
+ ],
+ [
'../foobar',
- array(),
+ [],
false,
'UnexpectedValueException'
- ),
- array(
+ ],
+ [
'nonexistenttemplate',
- array(),
+ [],
false,
'RuntimeException',
- )
- );
+ ],
+ [
+ 'has_partial',
+ [
+ 'planet' => 'world',
+ ],
+ "Partial hello world!\n in here\n",
+ ],
+ [
+ 'bad_partial',
+ [],
+ false,
+ 'Exception',
+ ],
+ ];
}
}