public function BestPracticesReportCase::testFast404One in Site Audit 8.2
If fast_404 is enabled and fast_404 paths are empty, check should warn.
File
- tests/
bestPracticesReportTest.php, line 27 - Contains /site_audit/tests/BestPracticesReportCase.
Class
- BestPracticesReportCase
- Class BestPracticesReportCase.
Namespace
UnishCode
public function testFast404One() {
// Enable fast_404 and make fast_404 paths empty.
$eval1 = <<<EOT
\$config = \\Drupal::configFactory()->getEditable('system.performance');
\$config->set('fast_404.enabled', TRUE);
\$config->set('fast_404.paths', '');
\$config->save();
EOT;
$this
->drush('php-eval', array(
$eval1,
), $this->options);
// Execute the best-practices command and get output.
$this
->drush('audit-best-practices', array(), $this->options + array(
'detail' => NULL,
'json' => NULL,
));
$output = json_decode($this
->getOutput());
$this
->assertEquals(\SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN, $output->checks->SiteAuditCheckBestPracticesFast404->score);
}