public function CronReportCase::testEnabledPassOne in Site Audit 8.2
Run the cron and set cron frequency to < 24 hours. Check should Pass.
File
- tests/
cronReportTest.php, line 28 - Contains /site_audit/tests/CronReportCase.
Class
- CronReportCase
- Class CronReportCase.
Namespace
UnishCode
public function testEnabledPassOne() {
$eval1 = <<<EOT
\$config = \\Drupal::configFactory()->getEditable('system.cron');
\$config->set('threshold.autorun', 60*60);
\$config->save();
EOT;
$this
->drush('php-eval', array(
$eval1,
), $this->options);
$this
->drush('cron', array(), $this->options);
$this
->drush('audit-cron', array(), $this->options + array(
'detail' => NULL,
'json' => NULL,
));
$output = json_decode($this
->getOutput());
$this
->assertEquals(\SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS, $output->checks->SiteAuditCheckCronEnabled->score);
}