You are here

public function ExtensionsReportCase::testDuplicatePass in Site Audit 8.2

Multiple versions of the same module, one in profile and enabled. Pass.

File

tests/extensionsReportTest.php, line 112
Contains /site_audit/tests/ExtensionsReportCase.

Class

ExtensionsReportCase
Class ExtensionsReportCase.

Namespace

Unish

Code

public function testDuplicatePass() {
  \mkdir($this->options['root'] . '/profiles/standard');
  \mkdir($this->options['root'] . '/profiles/standard/modules');
  $this
    ->drush('pm-download', array(
    'rules-8.x-3.0-unstable4',
  ), $this->options);
  $this
    ->drush('pm-download', array(
    'rules-8.x-3.0-unstable3',
  ), $this->options + array(
    'destination' => 'profiles/standard/modules',
  ));
  $this
    ->drush('pm-enable', array(
    'rules',
  ), $this->options);
  $this
    ->drush('audit-extensions', array(), $this->options + array(
    'detail' => NULL,
    'json' => NULL,
  ));
  $output = json_decode($this
    ->getOutput());
  $this
    ->assertEquals(\SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS, $output->checks->SiteAuditCheckExtensionsDuplicate->score);
}