develDrushTest.php 982 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * @file
  4. * PHPUnit Tests for devel. This uses Drush's own test framework, based on PHPUnit.
  5. * To run the tests, use phpunit --bootstrap=/path/to/drush/tests/drush_testcase.inc.
  6. * Note that we are pointing to the drush_testcase.inc file under /tests subdir in drush.
  7. */
  8. class develCase extends Drush_CommandTestCase {
  9. public function testFnView() {
  10. $sites = $this->setUpDrupal(1, TRUE);
  11. $options = array(
  12. 'root' => $this->webroot(),
  13. 'uri' => key($sites),
  14. );
  15. $this->drush('pm-download', array('devel'), $options + array('cache' => NULL));
  16. $this->drush('pm-enable', array('devel'), $options + array('skip' => NULL, 'yes' => NULL));
  17. $this->drush('fn-view', array('drush_main'), $options);
  18. $output = $this->getOutput();
  19. $this->assertContains('@return', $output, 'Output contain @return Doxygen.');
  20. $this->assertContains('function drush_main() {', $output, 'Output contains function drush_main() declaration');
  21. }
  22. }