diff core/modules/block/tests/src/Kernel/BlockRebuildTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/block/tests/src/Kernel/BlockRebuildTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/block/tests/src/Kernel/BlockRebuildTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -47,7 +47,8 @@
    */
   public function testRebuildNoBlocks() {
     block_rebuild();
-    $messages = drupal_get_messages();
+    $messages = \Drupal::messenger()->all();
+    \Drupal::messenger()->deleteAll();
     $this->assertEquals([], $messages);
   }
 
@@ -58,7 +59,8 @@
     $this->placeBlock('system_powered_by_block', ['region' => 'content']);
 
     block_rebuild();
-    $messages = drupal_get_messages();
+    $messages = \Drupal::messenger()->all();
+    \Drupal::messenger()->deleteAll();
     $this->assertEquals([], $messages);
   }
 
@@ -89,7 +91,8 @@
     $block1 = Block::load($block1->id());
     $block2 = Block::load($block2->id());
 
-    $messages = drupal_get_messages();
+    $messages = \Drupal::messenger()->all();
+    \Drupal::messenger()->deleteAll();
     $expected = ['warning' => [new TranslatableMarkup('The block %info was assigned to the invalid region %region and has been disabled.', ['%info' => $block1->id(), '%region' => 'INVALID'])]];
     $this->assertEquals($expected, $messages);