X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fconfig%2FGlobalVarConfigTest.php;h=a6b220d6f65ebccbc63246390f0a2d75809e8e3b;hb=f036c5b324e2b2d240edf8d5eeb7fc2af3d88c47;hp=28068d5e2734e676f2a4b36a71b2fa147bc36eaf;hpb=3e8c0191a3d2b3a94cd88ec4117381a5cddfb955;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/config/GlobalVarConfigTest.php b/tests/phpunit/includes/config/GlobalVarConfigTest.php index 28068d5e27..a6b220d6f6 100644 --- a/tests/phpunit/includes/config/GlobalVarConfigTest.php +++ b/tests/phpunit/includes/config/GlobalVarConfigTest.php @@ -29,17 +29,18 @@ class GlobalVarConfigTest extends MediaWikiTestCase { } public static function provideConstructor() { - return array( - array( 'wg' ), - array( 'ef' ), - array( 'smw' ), - array( 'blahblahblahblah' ), - array( '' ), - ); + return [ + [ 'wg' ], + [ 'ef' ], + [ 'smw' ], + [ 'blahblahblahblah' ], + [ '' ], + ]; } /** * @covers GlobalVarConfig::has + * @covers GlobalVarConfig::hasWithPrefix */ public function testHas() { $this->maybeStashGlobal( 'wgGlobalVarConfigTestHas' ); @@ -51,33 +52,33 @@ class GlobalVarConfigTest extends MediaWikiTestCase { } public static function provideGet() { - $set = array( + $set = [ 'wgSomething' => 'default1', 'wgFoo' => 'default2', 'efVariable' => 'default3', 'BAR' => 'default4', - ); + ]; foreach ( $set as $var => $value ) { $GLOBALS[$var] = $value; } - return array( - array( 'Something', 'wg', 'default1' ), - array( 'Foo', 'wg', 'default2' ), - array( 'Variable', 'ef', 'default3' ), - array( 'BAR', '', 'default4' ), - array( 'ThisGlobalWasNotSetAbove', 'wg', false ) - ); + return [ + [ 'Something', 'wg', 'default1' ], + [ 'Foo', 'wg', 'default2' ], + [ 'Variable', 'ef', 'default3' ], + [ 'BAR', '', 'default4' ], + [ 'ThisGlobalWasNotSetAbove', 'wg', false ] + ]; } /** - * @param string $name - * @param string $prefix - * @param string $expected * @dataProvider provideGet * @covers GlobalVarConfig::get * @covers GlobalVarConfig::getWithPrefix + * @param string $name + * @param string $prefix + * @param string $expected */ public function testGet( $name, $prefix, $expected ) { $config = new GlobalVarConfig( $prefix );