function CronRunTestCase::testManualCron

Ensure that the manual cron run is working.

File

modules/system/system.test, line 931

Class

CronRunTestCase

Code

function testManualCron() {
  $admin_user = $this->drupalCreateUser(array(
    'administer site configuration',
  ));
  $this->drupalLogin($admin_user);
  $this->drupalGet('admin/reports/status/run-cron');
  $this->assertResponse(403);
  $this->drupalGet('admin/reports/status');
  $this->clickLink(t('run cron manually'));
  $this->assertResponse(200);
  $this->assertText(t('Cron ran successfully.'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.