function system_test_system_info_alter

Same name in other branches
  1. 9 core/modules/system/tests/modules/system_test/system_test.module \system_test_system_info_alter()
  2. 8.9.x core/modules/system/tests/modules/system_test/system_test.module \system_test_system_info_alter()
  3. 10 core/modules/system/tests/modules/system_test/system_test.module \system_test_system_info_alter()

Implements hook_system_info_alter().

File

modules/simpletest/tests/system_test.module, line 342

Code

function system_test_system_info_alter(&$info, $file, $type) {
    // We need a static otherwise the last test will fail to alter common_test.
    static $test;
    if (($dependencies = variable_get('dependencies', array())) || $test) {
        if ($file->name == 'module_test') {
            $info['hidden'] = FALSE;
            $info['dependencies'][] = array_shift($dependencies);
            variable_set('dependencies', $dependencies);
            $test = TRUE;
        }
        if ($file->name == 'common_test') {
            $info['hidden'] = FALSE;
            $info['version'] = '7.x-2.4-beta3';
        }
    }
    if ($file->name == 'system_project_namespace_test') {
        $info['hidden'] = FALSE;
    }
    // Make the system_dependencies_test visible by default.
    if ($file->name == 'system_dependencies_test') {
        $info['hidden'] = FALSE;
    }
    if (in_array($file->name, array(
        'system_incompatible_module_version_dependencies_test',
        'system_incompatible_core_version_dependencies_test',
        'system_incompatible_module_version_test',
        'system_incompatible_core_version_test',
    ))) {
        $info['hidden'] = FALSE;
    }
    if ($file->name == 'requirements1_test' || $file->name == 'requirements2_test') {
        $info['hidden'] = FALSE;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.