function BlockRebuildTest::testRebuildNoBlocks
Tests rebuild no blocks.
@legacy-covers \Drupal\block\Hook\BlockHooks::rebuild
File
-
core/
modules/ block/ tests/ src/ Kernel/ BlockRebuildTest.php, line 55
Class
- BlockRebuildTest
- Tests block_rebuild().
Namespace
Drupal\Tests\block\KernelCode
public function testRebuildNoBlocks() : void {
$blockRebuild = new BlockHooks();
$blockRebuild->rebuild();
$messages = \Drupal::messenger()->all();
\Drupal::messenger()->deleteAll();
$this->assertEquals([], $messages);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.