function ConfigEntityUpdaterTest::testUpdateOncePerUpdateException
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php \Drupal\KernelTests\Core\Config\Entity\ConfigEntityUpdaterTest::testUpdateOncePerUpdateException()
- 10 core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php \Drupal\KernelTests\Core\Config\Entity\ConfigEntityUpdaterTest::testUpdateOncePerUpdateException()
- 11.x core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php \Drupal\KernelTests\Core\Config\Entity\ConfigEntityUpdaterTest::testUpdateOncePerUpdateException()
@covers ::update
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Entity/ ConfigEntityUpdaterTest.php, line 132
Class
- ConfigEntityUpdaterTest
- Tests <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21ConfigEntityUpdater.php/class/ConfigEntityUpdater/8.9.x" title="A utility class to make updating configuration entities simple." class="local">\Drupal\Core\Config\Entity\ConfigEntityUpdater</a>.
Namespace
Drupal\KernelTests\Core\Config\EntityCode
public function testUpdateOncePerUpdateException() {
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Updating multiple entity types in the same update function is not supported');
$updater = $this->container
->get('class_resolver')
->getInstanceFromDefinition(ConfigEntityUpdater::class);
$sandbox = [];
$updater->update($sandbox, 'config_test');
$updater->update($sandbox, 'config_query_test');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.