public function commandCase::testDisabledModule

8.0.x commandTest.php public commandCase::testDisabledModule()
6.x commandTest.php public commandCase::testDisabledModule()
7.x commandTest.php public commandCase::testDisabledModule()
5.x commandTest.php public commandCase::testDisabledModule()
master commandTest.php public commandCase::testDisabledModule()

Assert that commands in disabled modules are detected.

File

tests/commandTest.php, line 84

Namespace

Unish

Class

commandCase
@group base

Code

public function testDisabledModule() {
  $sites = $this->setUpDrupal(1, TRUE);
  $uri = key($sites);
  $root = $this->webroot();
  $options = array(
    'root' => $root,
    'uri' => $uri,
    'cache' => NULL,
  );
  $this->drush('pm-download', array('devel'), $options);
  $options += array(
    'backend' => NULL, // To obtain and parse the error log.
  );
  $this->drush('devel-download', array(), $options, NULL, NULL, self::EXIT_ERROR);
  $parsed = $this->parse_backend_output($this->getOutput());
  $this->assertArrayHasKey("DRUSH_COMMAND_DEPENDENCY_ERROR", $parsed['error_log']);
}