siteAliasTest.php 761 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * @file
  4. * Tests for sitealias.inc
  5. */
  6. class saCase extends Drush_TestCase {
  7. /*
  8. * Assure that site lists work as expected.
  9. * @todo Use --backend for structured return data. Depends on http://drupal.org/node/1043922
  10. */
  11. public function testSAList() {
  12. $this->setUpDrupal('dev');
  13. $this->setUpDrupal('stage');
  14. $eval = 'print "bon";';
  15. $options = array(
  16. 'yes' => NULL,
  17. 'root' => $this->sites['dev']['root'],
  18. );
  19. $this->drush('php-eval', array($eval), $options, "#dev,#stage");
  20. $expected = "You are about to execute 'php-eval print \"bon\";' on all of the following targets:
  21. #dev
  22. #stage
  23. Continue? (y/n): y
  24. #dev >> bon
  25. #stage >> bon";
  26. $this->assertEquals($expected, $this->getOutput());
  27. }
  28. }