5 if (class_exists('Unish\CommandUnishTestCase')) {
8 * PHPUnit Tests for devel. This uses Drush's own test framework, based on PHPUnit.
9 * To run the tests, use run-tests-drush.sh from the devel directory.
11 class develCase extends CommandUnishTestCase {
13 public function testFnCommands() {
14 // Specify '8' just in case user has not set UNISH_DRUPAL_MAJOR_VERSION env variable.
15 $sites = $this->setUpDrupal(1, TRUE, '8');
17 // Symlink this module into the Site Under test so it can be enabled.
18 $target = dirname(__DIR__);
19 \symlink($target, $this->webroot() . '/modules/devel');
21 'root' => $this->webroot(),
24 $this->drush('pm-enable', array('devel'), $options + array('skip' => NULL, 'yes' => NULL));
26 $this->drush('fn-view', array('drush_main'), $options);
27 $output = $this->getOutput();
28 $this->assertContains('@return', $output, 'Output contain @return Doxygen.');
29 $this->assertContains('function drush_main() {', $output, 'Output contains function drush_main() declaration');
31 // $this->drush('fn-hook', array('cron'), $options);
32 // $output = $this->getOutputAsList();
33 // $expected = array('dblog', 'file', 'field', 'system', 'update');
34 // $this->assertSame($expected, $output);