diff options
Diffstat (limited to 'tests/phpunit/includes/config')
-rw-r--r-- | tests/phpunit/includes/config/GlobalVarConfigTest.php | 24 | ||||
-rw-r--r-- | tests/phpunit/includes/config/HashConfigTest.php | 2 |
2 files changed, 1 insertions, 25 deletions
diff --git a/tests/phpunit/includes/config/GlobalVarConfigTest.php b/tests/phpunit/includes/config/GlobalVarConfigTest.php index 70b9e684..28068d5e 100644 --- a/tests/phpunit/includes/config/GlobalVarConfigTest.php +++ b/tests/phpunit/includes/config/GlobalVarConfigTest.php @@ -87,34 +87,10 @@ class GlobalVarConfigTest extends MediaWikiTestCase { $this->assertEquals( $config->get( $name ), $expected ); } - public static function provideSet() { - return array( - array( 'Foo', 'wg', 'wgFoo' ), - array( 'SomethingRandom', 'wg', 'wgSomethingRandom' ), - array( 'FromAnExtension', 'eg', 'egFromAnExtension' ), - array( 'NoPrefixHere', '', 'NoPrefixHere' ), - ); - } - private function maybeStashGlobal( $var ) { if ( array_key_exists( $var, $GLOBALS ) ) { // Will be reset after this test is over $this->stashMwGlobals( $var ); } } - - /** - * @dataProvider provideSet - * @covers GlobalVarConfig::set - * @covers GlobalVarConfig::setWithPrefix - */ - public function testSet( $name, $prefix, $var ) { - $this->hideDeprecated( 'GlobalVarConfig::set' ); - $this->maybeStashGlobal( $var ); - $config = new GlobalVarConfig( $prefix ); - $random = wfRandomString(); - $config->set( $name, $random ); - $this->assertArrayHasKey( $var, $GLOBALS ); - $this->assertEquals( $random, $GLOBALS[$var] ); - } } diff --git a/tests/phpunit/includes/config/HashConfigTest.php b/tests/phpunit/includes/config/HashConfigTest.php index 3ad3bfbd..06973b09 100644 --- a/tests/phpunit/includes/config/HashConfigTest.php +++ b/tests/phpunit/includes/config/HashConfigTest.php @@ -60,4 +60,4 @@ class HashConfigTest extends MediaWikiTestCase { $conf->set( 'one', '3' ); $this->assertEquals( '3', $conf->get( 'one' ) ); } -}
\ No newline at end of file +} |