HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/drush-backups/https_inv_dir_legal/20190227184703/modules/devel/develDrushTest.php
<?php

/**
 * @file
 * PHPUnit Tests for devel.
 *
 * This uses Drush's own test framework, based on PHPUnit.
 * To run the tests, use
 * @code
 * phpunit --bootstrap=/path/to/drush/tests/drush_testcase.inc.
 * @endcode
 * Note that we are pointing to the drush_testcase.inc file under /tests subdir
 * in drush.
 */

/**
 * Class for testing Drush integration.
 */
class develCase extends Drush_CommandTestCase {

  /**
   * Tests the printing of a function and its Doxygen comment.
   */
  public function testFnView() {
    $sites = $this->setUpDrupal(1, TRUE);
    $options = array(
      'root' => $this->webroot(),
      'uri' => key($sites),
    );
    $this->drush('pm-download', array('devel'), $options + array('cache' => NULL));
    $this->drush('pm-enable', array('devel'), $options + array('skip' => NULL, 'yes' => NULL));

    $this->drush('fn-view', array('drush_main'), $options);
    $output = $this->getOutput();
    $this->assertContains('@return', $output, 'Output contain @return Doxygen.');
    $this->assertContains('function drush_main() {', $output, 'Output contains function drush_main() declaration');
  }
}