X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fparser%2FMagicVariableTest.php;h=9f5e38640e1681fdcbdfdd864d96ba69a603ed22;hb=5f0080715ab1f9e176420c737b4a0511e3cb280b;hp=8997846597a14afcdfbf3b779810ea90d2e59a39;hpb=c14fcf8015fdfb22e8717f2f7135eea5f2a943d3;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php index 8997846597..9f5e38640e 100644 --- a/tests/phpunit/includes/parser/MagicVariableTest.php +++ b/tests/phpunit/includes/parser/MagicVariableTest.php @@ -9,11 +9,13 @@ * @author Antoine Musso * @copyright Copyright © 2011, Antoine Musso * @file - * @todo covers tags * * @group Database */ +/** + * @covers Parser::getVariableValue + */ class MagicVariableTest extends MediaWikiTestCase { /** * @var Parser @@ -27,20 +29,20 @@ class MagicVariableTest extends MediaWikiTestCase { * them as integer. * @see MagicVariableTest::assertMagic() */ - private $expectedAsInteger = array( + private $expectedAsInteger = [ 'revisionday', 'revisionmonth1', - ); + ]; /** setup a basic parser object */ protected function setUp() { parent::setUp(); $contLang = Language::factory( 'en' ); - $this->setMwGlobals( array( + $this->setMwGlobals( [ 'wgLanguageCode' => 'en', 'wgContLang' => $contLang, - ) ); + ] ); $this->testParser = new Parser(); $this->testParser->Options( ParserOptions::newFromUserAndLang( new User, $contLang ) ); @@ -62,9 +64,9 @@ class MagicVariableTest extends MediaWikiTestCase { * @return array Array of numbers from 1 up to $num */ private static function createProviderUpTo( $num ) { - $ret = array(); + $ret = []; for ( $i = 1; $i <= $num; $i++ ) { - $ret[] = array( $i ); + $ret[] = [ $i ]; } return $ret;