function EntityMethodConfigActionsTest::testSetSingleThirdPartySetting

Same name and namespace in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Recipe/EntityMethodConfigActionsTest.php \Drupal\KernelTests\Core\Recipe\EntityMethodConfigActionsTest::testSetSingleThirdPartySetting()

@covers \Drupal\Core\Config\Entity\ConfigEntityBase::getThirdPartySetting

File

core/tests/Drupal/KernelTests/Core/Recipe/EntityMethodConfigActionsTest.php, line 55

Class

EntityMethodConfigActionsTest
@group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function testSetSingleThirdPartySetting() : void {
  $this->configActionManager
    ->applyAction('entity_method:core.entity_view_display:setThirdPartySetting', 'core.entity_view_display.entity_test_with_bundle.test.default', [
    'module' => 'entity_test',
    'key' => 'verb',
    'value' => 'Save',
  ]);
  /** @var \Drupal\Core\Config\Entity\ThirdPartySettingsInterface $display */
  $display = $this->container
    ->get(EntityDisplayRepositoryInterface::class)
    ->getViewDisplay('entity_test_with_bundle', 'test');
  $this->assertSame('Save', $display->getThirdPartySetting('entity_test', 'verb'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.