'update_test_postupdate_post_update_second',
'update_test_postupdate_post_update_test0',
'update_test_postupdate_post_update_test1',
'update_test_postupdate_post_update_test_batch-1',
'update_test_postupdate_post_update_test_batch-2',
'update_test_postupdate_post_update_test_batch-3',
];
$this->
assertSame($updates, \Drupal::
state()->
get('post_update_test_execution',
[]));
// Test post_update key value stores contains a list of the update functions
// that have run.
$existing_updates =
array_count_values(\Drupal::
keyValue('post_update'
)->
get('existing_updates'
));
$expected_updates =
[ 'update_test_postupdate_post_update_first',
'update_test_postupdate_post_update_second',
'update_test_postupdate_post_update_test1',
'update_test_postupdate_post_update_test0',
'update_test_postupdate_post_update_test_batch',
];
foreach ($expected_updates as $expected_update) { $this->
assertEquals(1,
$existing_updates[$expected_update],
new FormattableMarkup("@expected_update exists in 'existing_updates' key and only appears once.",
['@expected_update' =>
$expected_update]));
}