public function ContentReportCase::testVocabulariesUnusedPass in Site Audit 8.2
Pass if no empty vocabularies present.
File
- tests/
contentReportTest.php, line 41 - Contains /site_audit/tests/ContentReportCase.
Class
- ContentReportCase
- Class ContentReportCase.
Namespace
UnishCode
public function testVocabulariesUnusedPass() {
$this
->drush('pm-enable', array(
'taxonomy',
), $this->options);
$eval1 = <<<EOT
\$termStore = \\Drupal::entityManager()->getStorage('taxonomy_term');
\$term = \$termStore->create(array(
'name' => 'siteaudit',
'description' => 'siteaudit rocks',
'format' => filter_fallback_format(),
'weight' => 5,
'langcode' => 'und',
'vid' => 'taxonomy_term',
'parent' => array(0),
));
\$term->save();
EOT;
$this
->drush('php-eval', array(
$eval1,
), $this->options);
$this
->drush('audit-content', array(), $this->options + array(
'detail' => NULL,
'json' => NULL,
));
$output = json_decode($this
->getOutput());
$this
->assertEquals(\SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS, $output->checks->SiteAuditCheckContentVocabulariesUnused->score);
}