function ConfigEntityAdapterTest::testApplyDefaultValue

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityAdapterTest::testApplyDefaultValue()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityAdapterTest::testApplyDefaultValue()
  3. 11.x 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();
}

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