diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-13 05:37:46 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-13 05:37:46 +0000 |
commit | 1d09ec33bdcbcc761a6526e8982859600bd6958e (patch) | |
tree | a609d11f02df1fab68279b4bc47fdd2723cbad8b /modules/simpletest | |
parent | 89d04ea78a1d422b2dc21cd9e6e10344674632a1 (diff) | |
download | brdo-1d09ec33bdcbcc761a6526e8982859600bd6958e.tar.gz brdo-1d09ec33bdcbcc761a6526e8982859600bd6958e.tar.bz2 |
#602958 by chx: Added API function to SimpleTest to run cron, avoiding fatal errors.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index edab20875..37ff8cfa8 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1500,6 +1500,13 @@ class DrupalWebTestCase extends DrupalTestCase { } /** + * Runs cron in the Drupal installed by Simpletest. + */ + protected function cronRun() { + $this->drupalGet($GLOBALS['base_url'] . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal')))); + } + + /** * Check for meta refresh tag and if found call drupalGet() recursively. This * function looks for the http-equiv attribute to be set to "Refresh" * and is case-sensitive. |