You are here

protected function HelpTestCase::getModuleList in Drupal 7

Gets the list of enabled modules that implement hook_help().

Return value

array A list of enabled modules.

1 call to HelpTestCase::getModuleList()
HelpTestCase::setUp in modules/help/help.test
Sets up a Drupal site for running functional and integration tests.

File

modules/help/help.test, line 93
Tests for help.module.

Class

HelpTestCase
Tests help display and user access for all modules implementing help.

Code

protected function getModuleList() {
  $this->modules = array();
  $result = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC");
  foreach ($result as $module) {
    if (file_exists($module->filename) && function_exists($module->name . '_help')) {
      $fullname = unserialize($module->info);
      $this->modules[$module->name] = $fullname['name'];
    }
  }
}