In \Drupal\FunctionalTests\Update\UpdatePathTestBase::runUpdates:
// Ensure that the update hooks updated all entity schema.
$needs_updates = \Drupal::entityDefinitionUpdateManager()->needsUpdates();
$this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.');
if ($needs_updates) {
foreach (\Drupal::entityDefinitionUpdateManager()
->getChangeSummary() as $entity_type_id => $summary) {
foreach ($summary as $message) {
$this->fail($message);
}
}
}
If $needs_updates is TRUE, then the assertFalse() will fail, and the change summary reporting will never happen. Even if you disable this assertion, only the first message will be reported, even if multiple messages are returned by getChangeSummary().
It would make more sense to remove the assertFalse() call, implode the summary messages, and then fail the test.
Comments
Comment #9
lendudeSomewhere along the way, this got refactored pretty much as suggested in the IS!