function ConfigActionTest::testDuplicatePluralizedMethodNameException
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php \Drupal\KernelTests\Core\Config\Action\ConfigActionTest::testDuplicatePluralizedMethodNameException()
See also
\Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver\EntityMethodDeriver
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Action/ ConfigActionTest.php, line 200
Class
- ConfigActionTest
- Tests the config action system.
Namespace
Drupal\KernelTests\Core\Config\ActionCode
public function testDuplicatePluralizedMethodNameException() : void {
\Drupal::state()->set('config_test.class_override', DuplicatePluralizedMethodName::class);
\Drupal::entityTypeManager()->clearCachedDefinitions();
$this->installConfig('config_test');
/** @var \Drupal\Core\Config\Action\ConfigActionManager $manager */
$manager = $this->container
->get('plugin.manager.config_action');
$this->expectException(EntityMethodException::class);
$this->expectExceptionMessage('Duplicate action can not be created for ID \'config_test.dynamic:testMethod\' for Drupal\\config_test\\ConfigActionErrorEntity\\DuplicatePluralizedMethodName::testMethod(). The existing action is for the ::testMethod() method');
$manager->getDefinitions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.