function EntityMethodConfigActionsTest::setUp

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

Overrides KernelTestBase::setUp

File

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

Class

EntityMethodConfigActionsTest
Tests entity method config actions.

Namespace

Drupal\KernelTests\Core\Recipe

Code

protected function setUp() : void {
  parent::setUp();
  EntityTestBundle::create([
    'id' => 'test',
    'label' => $this->randomString(),
  ])
    ->save();
  $this->container
    ->get(EntityDisplayRepositoryInterface::class)
    ->getViewDisplay('entity_test_with_bundle', 'test')
    ->save();
  $this->configActionManager = $this->container
    ->get('plugin.manager.config_action');
}

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