r67572 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67571‎ | r67572 | r67573 >
Date:22:44, 7 June 2010
Author:mglaser
Status:ok
Tags:
Comment:
ensured backwards compatibility to MW prior 1.15.2. Credits to Chris Key
Modified paths:
  • /trunk/phase3/maintenance/tests/selenium/Selenium.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/selenium/Selenium.php
@@ -37,12 +37,16 @@
3838 }
3939
4040 public function login() {
41 - global $wgSeleniumTestsWikiUser, $wgSeleniumTestsWikiPassword, $wgSeleniumTestsWikiUrl;
 41+ global $wgSeleniumTestsWikiUser, $wgSeleniumTestsWikiPassword, $wgSeleniumTestsWikiUrl, $wgVersion;
4242
4343 $this->open( $wgSeleniumTestsWikiUrl . '/index.php?title=Special:Userlogin' );
4444 $this->type( 'wpName1', $wgSeleniumTestsWikiUser );
4545 $this->type( 'wpPassword1', $wgSeleniumTestsWikiPassword );
46 - $this->click( "//input[@id='wpLoginAttempt']" );
 46+ if (version_compare($wgVersion, '1.15.2', '>=')) {
 47+ $this->click( "//input[@id='wpLoginAttempt']" );
 48+ } else {
 49+ $this->click( "//input[@id='wpLoginattempt']" );
 50+ }
4751 $value = $this->doCommand( 'assertTitle', array( 'Login successful*' ) );
4852 }
4953

Status & tagging log