3 class GlobalVarConfigTest
extends MediaWikiTestCase
{
5 public function provideGet() {
7 'wgSomething' => 'default1',
9 'efVariable' => 'default3',
13 foreach ( $set as $var => $value ) {
14 $GLOBALS[$var] = $value;
18 array( 'Something', 'wg', 'default1' ),
19 array( 'Foo', 'wg', 'default2' ),
20 array( 'Variable', 'ef', 'default3' ),
21 array( 'BAR', '', 'default4' ),
27 * @param string $prefix
28 * @param string $expected
29 * @dataProvider provideGet
30 * @covers GlobalVarConfig::get
32 public function testGet( $name, $prefix, $expected ) {
33 $config = new GlobalVarConfig( $prefix );
34 $this->assertEquals( $config->get( $name ), $expected );