/**
  * Tests the build() method when a block is empty.
  *
  * @covers ::build
  * @covers ::buildRegions
  * @covers ::buildBlock
  */
 public function testBuildEmptyBlock()
 {
     $account = $this->prophesize(AccountInterface::class);
     $block1 = $this->prophesize(BlockPluginInterface::class);
     $block1->access($account)->willReturn(TRUE);
     // Building a block with empty content.
     $block1->build()->willReturn(['#cache' => ['tags' => [0 => 'tag_to_be_merged']]]);
     $context_handler = $this->prophesize(ContextHandlerInterface::class);
     $uuid_generator = $this->prophesize(UuidInterface::class);
     $token = $this->prophesize(Token::class);
     $block_manager = $this->prophesize(BlockManager::class);
     $condition_manager = $this->prophesize(ConditionManager::class);
     $variant_plugin = new PageBlockDisplayVariant([], '', [], $context_handler->reveal(), $account->reveal(), $uuid_generator->reveal(), $token->reveal(), $block_manager->reveal(), $condition_manager->reveal());
     // Empty block.
     $expected_build = ['#markup' => '', '#cache' => ['tags' => ['block_plugin:block_plugin_id', 'page:page_id', 'tag_to_be_merged'], 'contexts' => [], 'max-age' => -1]];
     $build = ['#block_plugin' => $block1->reveal(), '#cache' => ['tags' => ['page:page_id', 'block_plugin:block_plugin_id']]];
     $build = $variant_plugin->buildBlock($build);
     // Assert that cacheability metadata is merged.
     $this->assertSame($expected_build, $build);
 }