Added missing modules, including some as submodules.
[yaffs-website] / web / modules / contrib / devel / drush / develDrushTest.php
1 <?php
2
3 namespace Unish;
4
5 if (class_exists('Unish\CommandUnishTestCase')) {
6
7   /**
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.
10    */
11   class develCase extends CommandUnishTestCase {
12
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');
16
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');
20       $options = array(
21         'root' => $this->webroot(),
22         'uri' => key($sites),
23       );
24       $this->drush('pm-enable', array('devel'), $options + array('skip' => NULL, 'yes' => NULL));
25
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');
30
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);
35     }
36   }
37
38 }