class saCase

  1. 8.0.x tests/siteAliasTest.php saCase
  2. 6.x tests/siteAliasTest.php saCase
  3. 7.x tests/siteAliasTest.php saCase
  4. 4.x tests/siteAliasTest.php saCase
  5. 5.x tests/siteAliasTest.php saCase
  6. master tests/siteAliasTest.php saCase

Hierarchy

Expanded class hierarchy of saCase

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
Drush_TestCase::create_node_types_php function
Drush_TestCase::drush function Invoke drush in via execute().
Drush_TestCase::drush_major_version function
Drush_TestCase::escapeshellarg public static function
Drush_TestCase::execute function Actually runs the command. Does not trap the error stream output as this need PHP 4.3+.
Drush_TestCase::EXIT_ERROR constant
Drush_TestCase::EXIT_SUCCESS constant
Drush_TestCase::file_aliases function
Drush_TestCase::file_delete_recursive function Same code as drush_delete_dir().
Drush_TestCase::getOutput function Accessor for the last output.
Drush_TestCase::getOutputAsList function Accessor for the last output.
Drush_TestCase::is_windows public static function
Drush_TestCase::setUpBeforeClass public static function Assure that each class starts with an empty sandbox directory and a clean environment - http://drupal.org/node/1103568.
Drush_TestCase::setUpDrupal function
Drush_TestCase::tearDownAfterClass public static function Runs after each test case. Remove sandbox directory.
Drush_TestCase::_escapeshellarg_windows public static function
Drush_TestCase::__construct function
saCase::testSAList public function

File

tests/siteAliasTest.php, line 7

View source
class saCase extends Drush_TestCase {

  /*
   * Assure that site lists work as expected.
   * @todo Use --backend for structured return data. Depends on http://drupal.org/node/1043922
   */
  public function testSAList() {
    $this->setUpDrupal('dev');
    $this->setUpDrupal('stage');
    $eval = 'print "bon";';
    $options = array(
      'yes' => NULL,
      'root' => $this->sites['dev']['root'],
    );
    $this->drush('php-eval', array($eval), $options, "#dev,#stage");
    $expected = "You are about to execute 'php-eval print \"bon\";' on all of the following targets:
  #dev
  #stage
Continue?  (y/n): y
#dev   >> bon
#stage >> bon";
    $this->assertEquals($expected, $this->getOutput());
  }
}