function EntityMethodConfigActionsTest::testSetSingleThirdPartySetting
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/EntityMethodConfigActionsTest.php \Drupal\KernelTests\Core\Recipe\EntityMethodConfigActionsTest::testSetSingleThirdPartySetting()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ EntityMethodConfigActionsTest.php, line 48
Class
- EntityMethodConfigActionsTest
- @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testSetSingleThirdPartySetting() : void {
$recipe = <<<YAML
name: Third-party setting
config:
actions:
core.entity_view_display.node.test.full:
setThirdPartySetting:
module: layout_builder
key: enabled
value: true
YAML;
$recipe = $this->createRecipe($recipe);
RecipeRunner::processRecipe($recipe);
/** @var \Drupal\Core\Config\Entity\ThirdPartySettingsInterface $display */
$display = $this->container
->get(EntityDisplayRepositoryInterface::class)
->getViewDisplay('node', 'test', 'full');
$this->assertTrue($display->getThirdPartySetting('layout_builder', 'enabled'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.