You are here

protected function CommerceBaseTestCase::modulesUp in Commerce Core 7

Checks if a group of modules is enabled.

Parameters

$module_name: Array of module names to check (without the .module extension)

Return value

TRUE if all of the modules are enabled.

File

tests/commerce_base.test, line 623
Defines abstract base test class for the Commerce module tests.

Class

CommerceBaseTestCase
Abstract class for Commerce testing. All Commerce tests should extend this class.

Code

protected function modulesUp($module_names) {
  if (is_string($module_names)) {
    $module_names = array(
      $module_names,
    );
  }
  foreach ($module_names as $module_name) {
    if (!module_exists($module_name)) {
      return FALSE;
    }
  }
  return TRUE;
}