From 1d09ec33bdcbcc761a6526e8982859600bd6958e Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 13 Oct 2009 05:37:46 +0000 Subject: #602958 by chx: Added API function to SimpleTest to run cron, avoiding fatal errors. --- modules/simpletest/drupal_web_test_case.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/simpletest/drupal_web_test_case.php') 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 @@ -1499,6 +1499,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" -- cgit v1.2.3