update_script_test.module
Same filename in other branches
- 7.x modules/simpletest/tests/update_script_test.module
- 9 core/modules/system/tests/modules/update_script_test/update_script_test.module
- 8.9.x core/modules/system/tests/modules/update_script_test/update_script_test.module
- 11.x core/modules/system/tests/modules/update_script_test/update_script_test.module
This file provides testing functionality for update.php.
File
-
core/
modules/ system/ tests/ modules/ update_script_test/ update_script_test.module
View source
<?php
/**
* @file
* This file provides testing functionality for update.php.
*/
use Drupal\Core\Extension\Extension;
/**
* Implements hook_cache_flush().
*
* This sets a message to confirm that all caches are cleared whenever
* update.php completes.
*
* @see UpdateScriptFunctionalTest::testRequirements()
*/
function update_script_test_cache_flush() {
\Drupal::messenger()->addStatus(t('hook_cache_flush() invoked for update_script_test.module.'));
}
/**
* Implements hook_system_info_alter().
*/
function update_script_test_system_info_alter(array &$info, Extension $file, $type) {
$new_info = \Drupal::state()->get('update_script_test.system_info_alter');
if ($new_info) {
if ($file->getName() == 'update_script_test') {
$info = $new_info + $info;
}
}
}
Functions
Title | Deprecated | Summary |
---|---|---|
update_script_test_cache_flush | Implements hook_cache_flush(). | |
update_script_test_system_info_alter | Implements hook_system_info_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.