function locale_test_system_info_alter

Implements hook_system_info_alter().

Make the test scripts to be believe this is not a hidden test module, but a regular custom module.

File

drupal/core/modules/locale/tests/modules/locale_test/locale_test.module, line 14
Simulate a custom module with a local po file.

Code

function locale_test_system_info_alter(&$info, $file, $type) {

  // Only modify the system info if required.
  // By default the locale_test modules are hidden and have a project specified.
  // To test the module detection proces by locale_project_list() the
  // test modules should mimic a custom module. I.e. be non-hidden.
  if (state()
    ->get('locale_translation_test_system_info_alter')) {
    if ($file->name == 'locale_test' || $file->name == 'locale_test_disabled') {

      // Don't hide the module.
      $info['hidden'] = FALSE;
    }
  }
}