X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTemplateParserTest.php;h=469f45a5d99c2374e403f91260e70475e7b0ddf0;hb=ee71c2658eb8388039248010bfc99b0ca90d5c34;hp=ddef24aae961fdbb5b8037a4a0dabb49d4c7a098;hpb=9499586028e427a66cab01e550149b98e6e780a6;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/TemplateParserTest.php b/tests/phpunit/includes/TemplateParserTest.php index ddef24aae9..469f45a5d9 100644 --- a/tests/phpunit/includes/TemplateParserTest.php +++ b/tests/phpunit/includes/TemplateParserTest.php @@ -10,9 +10,9 @@ class TemplateParserTest extends MediaWikiTestCase { protected function setUp() { parent::setUp(); - $this->setMwGlobals( array( + $this->setMwGlobals( [ 'wgSecretKey' => 'foo', - ) ); + ] ); $this->templateDir = dirname( __DIR__ ) . '/data/templates/'; } @@ -32,44 +32,44 @@ class TemplateParserTest extends MediaWikiTestCase { } 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', - ), - array( + ], + [ 'has_partial', - array( + [ 'planet' => 'world', - ), + ], "Partial hello world!\n in here\n", - ), - array( + ], + [ 'bad_partial', - array(), + [], false, 'Exception', - ), - ); + ], + ]; } }