diff 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
line wrap: on
line diff
--- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php	Mon Apr 23 09:46:53 2018 +0100
@@ -374,7 +374,6 @@
 
       // 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) {
@@ -382,6 +381,9 @@
             $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.');
       }
     }
   }