You are here

function update_test_failing_post_update_first in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/update_test_failing/update_test_failing.post_update.php \update_test_failing_post_update_first()
  2. 9 core/modules/system/tests/modules/update_test_failing/update_test_failing.post_update.php \update_test_failing_post_update_first()

First update, should not be run since this module's update hooks fail.

File

core/modules/system/tests/modules/update_test_failing/update_test_failing.post_update.php, line 11
Post update functions for test module.

Code

function update_test_failing_post_update_first() {
  $execution = \Drupal::state()
    ->get('post_update_test_execution', []);
  $execution[] = __FUNCTION__;
  \Drupal::state()
    ->set('post_update_test_execution', $execution);
}