From ff3485ec99de12c6328e2b73c8c3e2026ecf772a Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 21 Mar 2013 20:35:44 +0100 Subject: Tests: Use more setMwGlobals Change some tests to use setMwGlobals to have restoring of globals after the test. This also removes some save/restore code, which is not needed, due to the automatically restoring on tearDown with setMwGlobals. Change-Id: I8d2ac9f6cc14f0bd4ee8eb851c09f2e71babc6e0 --- tests/phpunit/includes/SeleniumConfigurationTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/phpunit/includes/SeleniumConfigurationTest.php') diff --git a/tests/phpunit/includes/SeleniumConfigurationTest.php b/tests/phpunit/includes/SeleniumConfigurationTest.php index 3422c90c4229..4b49f639e811 100644 --- a/tests/phpunit/includes/SeleniumConfigurationTest.php +++ b/tests/phpunit/includes/SeleniumConfigurationTest.php @@ -138,8 +138,8 @@ testBrowser = "firefox" $seleniumSettings = array(); $seleniumBrowsers = array(); $seleniumTestSuites = array(); - global $wgSeleniumConfigFile; - $wgSeleniumConfigFile = ''; + $this->setMwGlobals( 'wgSeleniumConfigFile', '' ); + SeleniumConfig::getSeleniumSettings( $seleniumSettings, $seleniumBrowsers, $seleniumTestSuites ); @@ -152,9 +152,9 @@ testBrowser = "firefox" $seleniumSettings = array(); $seleniumBrowsers = array(); $seleniumTestSuites = array(); - global $wgSeleniumConfigFile; $this->writeToTempFile( $this->testConfig0 ); - $wgSeleniumConfigFile = $this->tempFileName; + $this->setMwGlobals( 'wgSeleniumConfigFile', $this->tempFileName ); + SeleniumConfig::getSeleniumSettings( $seleniumSettings, $seleniumBrowsers, $seleniumTestSuites ); -- cgit v1.2.3