function EntityMethodConfigActionsTest::testSetSingleThirdPartySetting

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

File

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

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.