function ConfigActionsTest::testPlaceBlockActionDoesNotChangeExistingBlock
File
-
core/
modules/ block/ tests/ src/ Kernel/ ConfigActionsTest.php, line 80
Class
- ConfigActionsTest
- @covers \Drupal\block\Plugin\ConfigAction\PlaceBlock @covers \Drupal\block\Plugin\ConfigAction\PlaceBlockDeriver @group block
Namespace
Drupal\Tests\block\KernelCode
public function testPlaceBlockActionDoesNotChangeExistingBlock() : void {
$extant_region = Block::load('olivero_powered')->getRegion();
$this->assertNotSame('content', $extant_region);
$this->configActionManager
->applyAction('placeBlockInDefaultTheme', 'block.block.olivero_powered', [
'plugin' => 'system_powered_by_block',
'region' => [
'olivero' => 'content',
],
]);
// The extant block should be unchanged.
$this->assertSame($extant_region, Block::load('olivero_powered')->getRegion());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.