* Dynamically change configuration variables based on the test suite name and a cookie value.
* For details on how to configure a wiki for a Selenium test, see:
* http://www.mediawiki.org/wiki/SeleniumFramework#Test_Wiki_configuration
* Dynamically change configuration variables based on the test suite name and a cookie value.
* For details on how to configure a wiki for a Selenium test, see:
* http://www.mediawiki.org/wiki/SeleniumFramework#Test_Wiki_configuration
- if ( preg_match( '/[^a-zA-Z0-9_-]/', $setupTestSuiteName ) || !isset( $wgSeleniumTestConfigs[$setupTestSuiteName] ) ) {
+ if (
+ preg_match( '/[^a-zA-Z0-9_-]/', $setupTestSuiteName ) ||
+ !isset( $wgSeleniumTestConfigs[$setupTestSuiteName] )
+ )
+ {
- $testIncludes = array(); //array containing all the includes needed for this test
- $testGlobalConfigs = array(); //an array containg all the global configs needed for this test
+ $testIncludes = array(); // array containing all the includes needed for this test
+ $testGlobalConfigs = array(); // an array containg all the global configs needed for this test
$testResourceFiles = array(); // an array containing all the resource files needed for this test
$callback = $wgSeleniumTestConfigs[$setupTestSuiteName];
call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles));
$testResourceFiles = array(); // an array containing all the resource files needed for this test
$callback = $wgSeleniumTestConfigs[$setupTestSuiteName];
call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles));
if ( isset( $_GET['clearTestSuite'] ) ) {
$testSuiteName = getTestSuiteNameFromCookie( $cookieName );
$expire = time() - 600;
if ( isset( $_GET['clearTestSuite'] ) ) {
$testSuiteName = getTestSuiteNameFromCookie( $cookieName );
$expire = time() - 600;
$testResourceName = getTestResourceNameFromTestSuiteName( $testSuiteName );
teardownTestResources( $testResourceName );
}
$testResourceName = getTestResourceNameFromTestSuiteName( $testSuiteName );
teardownTestResources( $testResourceName );
}
if ( isset( $_COOKIE[$cookieName] ) ) {
$testSuiteName = getTestSuiteNameFromCookie( $cookieName );
if ( !isset( $wgSeleniumTestConfigs[$testSuiteName] ) ) {
return;
}
if ( isset( $_COOKIE[$cookieName] ) ) {
$testSuiteName = getTestSuiteNameFromCookie( $cookieName );
if ( !isset( $wgSeleniumTestConfigs[$testSuiteName] ) ) {
return;
}
- $testIncludes = array(); //array containing all the includes needed for this test
- $testGlobalConfigs = array(); //an array containg all the global configs needed for this test
+ $testIncludes = array(); // array containing all the includes needed for this test
+ $testGlobalConfigs = array(); // an array containg all the global configs needed for this test
$testResourceFiles = array(); // an array containing all the resource files needed for this test
$callback = $wgSeleniumTestConfigs[$testSuiteName];
call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles));
$testResourceFiles = array(); // an array containing all the resource files needed for this test
$callback = $wgSeleniumTestConfigs[$testSuiteName];
call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles));
- //create tables
- $dbw =& wfGetDB( DB_MASTER );
- $dbw->query( "DROP DATABASE IF EXISTS ".$testResourceName );
- $dbw->query( "CREATE DATABASE ".$testResourceName );
+ // create tables
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->query( 'DROP DATABASE IF EXISTS ' . $testResourceName );
+ $dbw->query( 'CREATE DATABASE ' . $testResourceName );
$objects = scandir( $dir );
foreach ( $objects as $object ) {
if ( $object != "." && $object != ".." ) {
$objects = scandir( $dir );
foreach ( $objects as $object ) {
if ( $object != "." && $object != ".." ) {