r82880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82879‎ | r82880 | r82881 >
Date:00:36, 27 February 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
$somevariable; doesn't count as defining a variable
Modified paths:
  • /trunk/phase3/tests/RunSeleniumTests.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/SeleniumConfigurationTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/SeleniumConfigurationTest.php
@@ -121,9 +121,9 @@
122122 * @group SeleniumFramework
123123 */
124124 public function testErrorOnIncorrectConfigFile() {
125 - $seleniumSettings;
126 - $seleniumBrowsers;
127 - $seleniumTestSuites;
 125+ $seleniumSettings = array();
 126+ $seleniumBrowsers = array();
 127+ $seleniumTestSuites = array();
128128
129129 SeleniumConfig::getSeleniumSettings($seleniumSettings,
130130 $seleniumBrowsers,
@@ -137,9 +137,9 @@
138138 * @group SeleniumFramework
139139 */
140140 public function testErrorOnMissingConfigFile() {
141 - $seleniumSettings;
142 - $seleniumBrowsers;
143 - $seleniumTestSuites;
 141+ $seleniumSettings = array();
 142+ $seleniumBrowsers = array();
 143+ $seleniumTestSuites = array();
144144 global $wgSeleniumConfigFile;
145145 $wgSeleniumConfigFile = '';
146146 SeleniumConfig::getSeleniumSettings($seleniumSettings,
@@ -151,9 +151,9 @@
152152 * @group SeleniumFramework
153153 */
154154 public function testUsesGlobalVarForConfigFile() {
155 - $seleniumSettings;
156 - $seleniumBrowsers;
157 - $seleniumTestSuites;
 155+ $seleniumSettings = array();
 156+ $seleniumBrowsers = array();
 157+ $seleniumTestSuites = array();
158158 global $wgSeleniumConfigFile;
159159 $this->writeToTempFile( $this->testConfig0 );
160160 $wgSeleniumConfigFile = $this->tempFileName;
@@ -177,9 +177,9 @@
178178 */
179179 public function testgetSeleniumSettings($sampleConfig, $expectedSettings, $expectedBrowsers, $expectedSuites ) {
180180 $this->writeToTempFile( $sampleConfig );
181 - $seleniumSettings;
182 - $seleniumBrowsers;
183 - $seleniumTestSuites;
 181+ $seleniumSettings = array();
 182+ $seleniumBrowsers = array();
 183+ $seleniumTestSuites = array();
184184
185185 SeleniumConfig::getSeleniumSettings($seleniumSettings,
186186 $seleniumBrowsers,
Index: trunk/phase3/tests/RunSeleniumTests.php
@@ -153,9 +153,9 @@
154154 public function execute() {
155155 global $wgServer, $wgScriptPath, $wgHooks;
156156
157 - $seleniumSettings;
158 - $seleniumBrowsers;
159 - $seleniumTestSuites;
 157+ $seleniumSettings = array();
 158+ $seleniumBrowsers = array();
 159+ $seleniumTestSuites = array();
160160
161161 $configFile = $this->getOption( 'seleniumConfig', '' );
162162 if ( strlen( $configFile ) > 0 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r82935Blindly fix the error produced in r82880.platonides15:16, 28 February 2011

Comments

#Comment by Platonides (talk | contribs)   20:11, 27 February 2011

I now see SeleniumConfigurationTest::testgetSeleniumSettings failing

#Comment by Reedy (talk | contribs)   20:18, 27 February 2011

An idea what they should be set to by default? = null?

#Comment by Platonides (talk | contribs)   15:16, 28 February 2011

Fixed in r82935. It may not be the expected outcome, though.

Status & tagging log