Created
April 26, 2011 13:44
-
-
Save ygerasimov/942284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get database prefix. | |
$database_prefix = $GLOBALS['drupal_test_info']['test_run_id']; | |
// Generate user agent string. | |
if (preg_match('/simpletest\d+/', $database_prefix, $matches)) { | |
$user_agent = drupal_generate_test_ua($matches[0]); | |
} | |
else { | |
throw new Exception('Test is not ready to init connection to Webdriver (no database prefix)'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get database prefix. | |
$database_prefix = $GLOBALS['drupal_test_info']['test_run_id']; | |
// Generate user agent string. | |
if (preg_match('/simpletest\d+/', $database_prefix, $matches)) { | |
$user_agent = drupal_generate_test_ua($matches[0]); | |
} | |
else { | |
throw new Exception('Test is not ready to init connection to Webdriver (no database prefix)'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment