=== modified file 'modules/search/search.test'
--- modules/search/search.test	2009-10-11 03:07:16 +0000
+++ modules/search/search.test	2009-10-13 04:26:11 +0000
@@ -499,7 +499,7 @@ class SearchCommentTestCase extends Drup
 
     // Invoke search index update.
     $this->drupalLogout();
-    $this->drupalGet($GLOBALS['base_url'] . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))));
+    $this->cronRun();
 
     // Search for $title.
     $edit = array(
@@ -521,7 +521,7 @@ class SearchCommentTestCase extends Drup
 
     // Invoke search index update.
     $this->drupalLogout();
-    $this->drupalGet($GLOBALS['base_url'] . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))));
+    $this->cronRun();
 
     // Search for $title.
     $this->drupalPost('', $edit, t('Search'));

=== modified file 'modules/simpletest/drupal_web_test_case.php'
--- modules/simpletest/drupal_web_test_case.php	2009-10-11 03:07:16 +0000
+++ modules/simpletest/drupal_web_test_case.php	2009-10-13 04:53:03 +0000
@@ -1500,6 +1500,13 @@ class DrupalWebTestCase extends DrupalTe
   }
 
   /**
+   * Runs cron in the installed Drupal.
+   */
+  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.

=== modified file 'modules/system/system.test'
--- modules/system/system.test	2009-10-11 03:07:16 +0000
+++ modules/system/system.test	2009-10-13 04:27:57 +0000
@@ -387,8 +387,8 @@ class CronRunTestCase extends DrupalWebT
     $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
     $this->assertResponse(200);
 
-    // Execute cron directly.
-    $this->assertTrue(drupal_cron_run(), t('Cron ran successfully.'));
+    // Test our cron run method.
+    $this->assertTrue($this->cronRun(), t('Cron ran successfully.'));
   }
 
   /**
@@ -475,7 +475,7 @@ class CronRunTestCase extends DrupalWebT
     $this->assertTrue(file_exists($perm_new->uri), t('New permanent file was created correctly.'));
 
     // Run cron and then ensure that only the old, temp file was deleted.
-    $this->assertTrue(drupal_cron_run(), t('Cron ran successfully.'));
+    $this->assertTrue($this->cronRun(), t('Cron ran successfully.'));
     $this->assertFalse(file_exists($temp_old->uri), t('Old temp file was correctly removed.'));
     $this->assertTrue(file_exists($temp_new->uri), t('New temp file was correctly ignored.'));
     $this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was correctly ignored.'));

=== modified file 'modules/trigger/trigger.test'
--- modules/trigger/trigger.test	2009-10-11 03:07:16 +0000
+++ modules/trigger/trigger.test	2009-10-13 04:27:03 +0000
@@ -165,7 +165,7 @@ class TriggerCronTestCase extends Drupal
     $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
 
     // Force a cron run.
-    drupal_cron_run();
+    $this->cronRun();
 
     // Make sure the non-configurable action has fired.
     $action_run = variable_get('trigger_test_system_cron_action', FALSE);

