function BlockValidationTest::setLabel
Same name in other branches
- 10 core/modules/block/tests/src/Kernel/BlockValidationTest.php \Drupal\Tests\block\Kernel\BlockValidationTest::setLabel()
Overrides ConfigEntityValidationTestBase::setLabel
1 call to BlockValidationTest::setLabel()
- BlockValidationTest::testLabelValidation in core/
modules/ block/ tests/ src/ Kernel/ BlockValidationTest.php
File
-
core/
modules/ block/ tests/ src/ Kernel/ BlockValidationTest.php, line 96
Class
- BlockValidationTest
- Tests validation of block entities.
Namespace
Drupal\Tests\block\KernelCode
protected static function setLabel(ConfigEntityInterface $block, string $label) : void {
static::assertInstanceOf(Block::class, $block);
$settings = $block->get('settings');
static::assertNotEmpty($settings['label']);
$settings['label'] = $label;
$block->set('settings', $settings);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.