function requirements1_test_requirements in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()
- 7 modules/simpletest/tests/requirements1_test.install \requirements1_test_requirements()
- 9 core/modules/system/tests/modules/requirements1_test/requirements1_test.install \requirements1_test_requirements()
Implements hook_requirements().
File
- core/
modules/ system/ tests/ modules/ requirements1_test/ requirements1_test.install, line 11 - Install hooks for test module.
Code
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.'),
];
}
return $requirements;
}