public function commandCase::testMissingDrushDependency

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

Assert that commands depending on unknown commandfiles are detected.

File

tests/commandTest.php, line 67

Class

commandCase
@group base

Code

public function testMissingDrushDependency() {
  $options = array(
    'include' => dirname(__FILE__), // Find unit.drush.inc commandfile.
    'backend' => NULL, // To obtain and parse the error log.
  );
  $this->drush('unit-drush-dependency', array(), $options, NULL, NULL, self::EXIT_ERROR);
  $parsed = parse_backend_output($this->getOutput());
  $this->assertArrayHasKey("DRUSH_COMMANDFILE_DEPENDENCY_ERROR", $parsed['error_log']);
}