// Ensure there are no failed updates.
if ($this->checkFailedUpdates
) { $failure =
$this->
cssSelect('.failure'
);
if ($failure) { $this->
fail('The update failed with the following message: "' .
reset($failure)->
getText() . '"'
);
} // Ensure that there are no pending updates.
foreach (['update', 'post_update'
] as $update_type) { switch ($update_type) { case 'update':
drupal_load_updates();
$all_updates =
update_get_update_list();
break;
case 'post_update':
$all_updates = \Drupal::
service('update.post_update_registry'
)->
getPendingUpdateInformation();
break;
} foreach ($all_updates as $module =>
$updates) { if (!
empty($updates['pending'
])) { foreach (array_keys($updates['pending'
]) as $update_name) { $this->
fail("The
$update_name() update function from the
$module module did not run."
);
}