You are here

public function ConfigEntityAdapterTest::testApplyDefaultValue in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityAdapterTest::testApplyDefaultValue()

@covers ::applyDefaultValue

File

core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php, line 143

Class

ConfigEntityAdapterTest
Tests entity adapter for configuration entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testApplyDefaultValue() {
  $this
    ->expectException(\BadMethodCallException::class);
  $this
    ->expectExceptionMessage('Method not supported');
  $adapter = ConfigEntityAdapter::createFromEntity($this->entity);
  $adapter
    ->applyDefaultValue();
}