// 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) {
$this->fail($message);
}
}
+ // The above calls to `fail()` should prevent this from ever being
+ // called, but it is here in case something goes really wrong.
+ $this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.');
}
}
}