requirements1_test.install

Same filename in other branches
  1. 7.x modules/simpletest/tests/requirements1_test.install
  2. 9 core/modules/system/tests/modules/requirements1_test/requirements1_test.install
  3. 8.9.x core/modules/system/tests/modules/requirements1_test/requirements1_test.install
  4. 10 core/modules/system/tests/modules/requirements1_test/requirements1_test.install

File

core/modules/system/tests/modules/requirements1_test/requirements1_test.install

View source
<?php


/**
 * @file
 * Install hooks for test module.
 */
declare (strict_types=1);

/**
 * Implements hook_requirements().
 */
function requirements1_test_requirements($phase) {
    $requirements = [];
    // Always fails requirements.
    if ('install' == $phase) {
        $requirements['requirements1_test'] = [
            'title' => t('Requirements 1 Test'),
            'severity' => REQUIREMENT_ERROR,
            'description' => t('Requirements 1 Test failed requirements.'),
        ];
    }
    $requirements['requirements1_test_alterable'] = [
        'title' => t('Requirements 1 Test Alterable'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('A requirement that will be altered.'),
    ];
    $requirements['requirements1_test_deletable'] = [
        'title' => t('Requirements 1 Test Deletable'),
        'severity' => REQUIREMENT_INFO,
        'description' => t('A requirement that will be deleted.'),
    ];
    return $requirements;
}

Functions

Title Deprecated Summary
requirements1_test_requirements Implements hook_requirements().

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