comparison core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children c2387f117808
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
372 $this->assertConfigSchema($typed_config, $name, $config->get()); 372 $this->assertConfigSchema($typed_config, $name, $config->get());
373 } 373 }
374 374
375 // Ensure that the update hooks updated all entity schema. 375 // Ensure that the update hooks updated all entity schema.
376 $needs_updates = \Drupal::entityDefinitionUpdateManager()->needsUpdates(); 376 $needs_updates = \Drupal::entityDefinitionUpdateManager()->needsUpdates();
377 $this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.');
378 if ($needs_updates) { 377 if ($needs_updates) {
379 foreach (\Drupal::entityDefinitionUpdateManager() 378 foreach (\Drupal::entityDefinitionUpdateManager()
380 ->getChangeSummary() as $entity_type_id => $summary) { 379 ->getChangeSummary() as $entity_type_id => $summary) {
381 foreach ($summary as $message) { 380 foreach ($summary as $message) {
382 $this->fail($message); 381 $this->fail($message);
383 } 382 }
384 } 383 }
384 // The above calls to `fail()` should prevent this from ever being
385 // called, but it is here in case something goes really wrong.
386 $this->assertFalse($needs_updates, 'After all updates ran, entity schema is up to date.');
385 } 387 }
386 } 388 }
387 } 389 }
388 390
389 /** 391 /**