function coreCase::testDrupalDirectory

8.0.x coreTest.php coreCase::testDrupalDirectory()
6.x coreTest.php coreCase::testDrupalDirectory()
7.x coreTest.php coreCase::testDrupalDirectory()
4.x coreTest.php coreCase::testDrupalDirectory()
5.x coreTest.php coreCase::testDrupalDirectory()
master coreTest.php coreCase::testDrupalDirectory()

File

tests/coreTest.php, line 87

Class

coreCase

Code

function testDrupalDirectory() {
  $this->setUpDrupal(1, TRUE);
  $root = $this->webroot();
  $options = array(
    'root' => $root,
    'uri' => key($this->sites),
    'verbose' => NULL,
    'skip' => NULL, // No FirePHP
    'yes' => NULL,
    'cache' => NULL,
    'invoke' => NULL, // invoke from script: do not verify options
  );
  $this->drush('pm-download', array('devel'), $options);
  $this->drush('pm-enable', array('devel', 'menu'), $options);

  $this->drush('drupal-directory', array('devel'), $options);
  $output = $this->getOutput();
  $this->assertEquals($root . '/sites/all/modules/devel', $output);

  $this->drush('drupal-directory', array('%files'), $options);
  $output = $this->getOutput();
  $this->assertEquals($root . '/sites/dev/files', $output);

  $this->drush('drupal-directory', array('%modules'), $options);
  $output = $this->getOutput();
  $this->assertEquals($root . '/sites/all/modules', $output);
}