You are here

public function SiteAuditTestAbstract::setUpSiteAuditTestEnvironment in Site Audit 8.2

Sets up environment for running site_audit tests.

8 calls to SiteAuditTestAbstract::setUpSiteAuditTestEnvironment()
BestPracticesReportCase::setUp in tests/bestPracticesReportTest.php
Sets up the environment for this test.
CacheReportCase::setUp in tests/cacheReportTest.php
Sets up the environment for this test.
ContentReportCase::setUp in tests/contentReportTest.php
Sets up the environment for this test.
CronReportCase::setUp in tests/cronReportTest.php
Sets up the environment for this test.
ExtensionsReportCase::setUp in tests/extensionsReportTest.php
Sets up the environment for this test.

... See full list

File

tests/Abstract.php, line 17
Contains /site_audit/tests/SiteAuditTestAbstract.

Class

SiteAuditTestAbstract
Class SiteAuditTestAbstract.

Namespace

Unish

Code

public function setUpSiteAuditTestEnvironment() {
  $site = $this
    ->setUpDrupal(1, TRUE, UNISH_DRUPAL_MAJOR_VERSION);
  $root = $this
    ->webroot();
  $this->options = array(
    'yes' => NULL,
    'root' => $root,
    'uri' => key($site),
  );

  // Symlink site_audit inside the site being tested, so that it is available
  // as a drush command.
  $target = dirname(__DIR__);
  \mkdir($root . '/drush');
  \symlink($target, $this
    ->webroot() . '/drush/site_audit');
  $this
    ->drush('cache-clear', array(
    'drush',
  ), $this->options);
  require_once $target . '/Check/Abstract.php';
}