You are here

public function CacheReportCase::testPreprocessJsPass in Site Audit 8.2

Set js.preprocess to true. Check should Pass.

File

tests/cacheReportTest.php, line 100
Contains /site_audit/tests/CacheReportCase.

Class

CacheReportCase
Class CacheReportCase.

Namespace

Unish

Code

public function testPreprocessJsPass() {
  $eval1 = <<<EOT
\$config = \\Drupal::configFactory()->getEditable('system.performance');
\$config->set('js.preprocess', TRUE);
\$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_PASS, $output->checks->SiteAuditCheckCachePreprocessJs->score);
}