function contextCase::setUpPaths

8.0.x contextTest.php contextCase::setUpPaths()
6.x contextTest.php contextCase::setUpPaths()
7.x contextTest.php contextCase::setUpPaths()
4.x contextTest.php contextCase::setUpPaths()
5.x contextTest.php contextCase::setUpPaths()
master contextTest.php contextCase::setUpPaths()
1 call to contextCase::setUpPaths()
contextCase::setUp in tests/contextTest.php
Try to write a tiny drushrc.php to each place that Drush checks. Also write a sites/dev/aliases.drushrc.php file to the sandbox.

File

tests/contextTest.php, line 17
Assure that context API behaves as designed. Mostly implicitly tested, but we do have some edges that need explicit testing. *

Namespace

Unish

Class

contextCase

Code

function setUpPaths() {
  $this->log("webroot: " . $this->webroot() . "\n", 'warning');
  $this->env = key($this->getSites());
  $this->site = $this->webroot() . '/sites/' . $this->env;
  $this->home = UNISH_SANDBOX . '/home';
  $this->paths = array(
    'custom' => UNISH_SANDBOX,
    'site' => $this->site,
    'drupal' => $this->webroot() . '/sites/all/drush',
    'drupal-parent' => dirname($this->webroot()) . '/drush',
    'user' => $this->home,
    'home.drush' => $this->home . '/.drush',
    'system' => UNISH_SANDBOX . '/etc/drush',
  );
  // Run each path through realpath() since the paths we'll compare against
  // will have already run through drush_load_config_file().
  foreach ($this->paths as $key => $path) {
    @mkdir($path);
    $this->paths[$key] = realpath($path);
  }
}