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 33

Class

coreCase

Code

function testDrupalDirectory() {
  $this->setUpDrupal('dev', TRUE);
  $root = $this->sites['dev']['root'];
  $options = array(
    'root' => $root,
    'uri' => 'dev',
    'verbose' => NULL,
    'yes' => NULL,
  );
  $this->drush('pm-download', array('devel-7.x-1.0'), $options);
  $this->drush('pm-enable', array('menu', 'devel'), $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);
}