function ConfigEntityAdapterTest::testApplyDefaultValue

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

Class

ConfigEntityAdapterTest
Tests entity adapter for configuration entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testApplyDefaultValue() : void {
    $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.