public function CronReportCase::testEnabledPassTwo in Site Audit 8.2
Set cron frequency to 0 and run cron. Check should Pass.
File
- tests/
cronReportTest.php, line 85 - Contains /site_audit/tests/CronReportCase.
Class
- CronReportCase
- Class CronReportCase.
Namespace
UnishCode
public function testEnabledPassTwo() {
$eval1 = <<<EOT
\$config = \\Drupal::configFactory()->getEditable('system.cron');
\$config->set('threshold.autorun', 0);
\$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);
}