You are here

public function BlockRebuildTest::testRebuildNoInvalidBlocks in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/tests/src/Kernel/BlockRebuildTest.php \Drupal\Tests\block\Kernel\BlockRebuildTest::testRebuildNoInvalidBlocks()
  2. 9 core/modules/block/tests/src/Kernel/BlockRebuildTest.php \Drupal\Tests\block\Kernel\BlockRebuildTest::testRebuildNoInvalidBlocks()

@covers ::block_rebuild

File

core/modules/block/tests/src/Kernel/BlockRebuildTest.php, line 58

Class

BlockRebuildTest
Tests block_rebuild().

Namespace

Drupal\Tests\block\Kernel

Code

public function testRebuildNoInvalidBlocks() {
  $this
    ->placeBlock('system_powered_by_block', [
    'region' => 'content',
  ]);
  block_rebuild();
  $messages = \Drupal::messenger()
    ->all();
  \Drupal::messenger()
    ->deleteAll();
  $this
    ->assertEquals([], $messages);
}