public function CacheReportCase::testPageExpireOne in Site Audit 8.2
Set cache.page.max_age to 0. Check should Fail.
File
- tests/
cacheReportTest.php, line 28 - Contains /site_audit/tests/CacheReportCase.
Class
- CacheReportCase
- Class CacheReportCase.
Namespace
UnishCode
public function testPageExpireOne() {
$eval1 = <<<EOT
\$config = \\Drupal::configFactory()->getEditable('system.performance');
\$config->set('cache.page.max_age', 0);
\$config->save();
EOT;
$this
->drush('php-eval', array(
$eval1,
), $this->options);
$this
->drush('audit-cache', array(), $this->options + array(
'detail' => NULL,
'json' => NULL,
));
$output = json_decode($this
->getOutput());
$this
->assertEquals(\SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL, $output->checks->SiteAuditCheckCachePageExpire->score);
}