// Set the schema version of update_test_postupdate to a lower version, so
// update_test_postupdate_update_8001() needs to be executed.
$update_registry->
setInstalledVersion('update_test_postupdate', 8000
);
$this->
drupalGet('admin/reports/status'
);
$this->
assertSession()->
pageTextContains('Out of date'
);
// Now cleanup the executed post update functions.
$update_registry->
setInstalledVersion('update_test_postupdate', 8001
);
/** @var \Drupal\Core\Update\UpdateRegistry $post_update_registry */
$post_update_registry = \Drupal::
service('update.post_update_registry'
);
$post_update_registry->
filterOutInvokedUpdatesByExtension('update_test_postupdate'
);
$this->
drupalGet('admin/reports/status'
);
$this->
assertSession()->
pageTextContains('Out of date'
);
$this->
drupalGet('admin/reports/status/php'
);
$this->
assertSession()->
statusCodeEquals(200
);
$settings['settings'
]['sa_core_2023_004_phpinfo_flags'
] =
(object) [ 'value' => INFO_ALL,
'required' => TRUE,
];
$this->
writeSettings($settings);