function requirements1_test_requirements

Same name in other branches
  1. 9 core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()
  2. 8.9.x core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()
  3. 10 core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()
  4. 11.x core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()

Implements hook_requirements().

File

modules/simpletest/tests/requirements1_test.install, line 6

Code

function requirements1_test_requirements($phase) {
    $requirements = array();
    // Ensure translations don't break during installation.
    $t = get_t();
    // Always fails requirements.
    if ('install' == $phase) {
        $requirements['requirements1_test'] = array(
            'title' => $t('Requirements 1 Test'),
            'severity' => REQUIREMENT_ERROR,
            'description' => $t('Requirements 1 Test failed requirements.'),
        );
    }
    return $requirements;
}

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