You are here

protected function oa_coreBaseUnitTest::enableModule in Open Atrium Core 7.2

Fake enables a module for the purpose of a unit test

Parameters

$name: The module's machine name (i.e. ctools not Chaos Tools)

1 call to oa_coreBaseUnitTest::enableModule()
oa_coreBaseUnitTest::setUp in tests/oa_coreBase.test
One using of this function is to enable the module used for testing, any dependencies or anything else that might be universal for all tests

File

tests/oa_coreBase.test, line 97
Provides a base unit test class.

Class

oa_coreBaseUnitTest

Code

protected function enableModule($name) {
  $modules = module_list();
  $modules[$name] = $name;

  // Transform the list into the format expected as input to module_list().
  foreach ($modules as &$module) {
    $module = array(
      'filename' => drupal_get_filename('module', $module),
    );
  }
  unset($module);
  module_list(TRUE, FALSE, FALSE, $modules);
}