function ConfigActionTest::testEntityMethodException
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php \Drupal\KernelTests\Core\Config\Action\ConfigActionTest::testEntityMethodException()
See also
\Drupal\Core\Config\Action\Plugin\ConfigAction\EntityMethod
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Action/ ConfigActionTest.php, line 228
Class
- ConfigActionTest
- Tests the config action system.
Namespace
Drupal\KernelTests\Core\Config\ActionCode
public function testEntityMethodException() : void {
$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('Entity method config action \'entity_method:config_test.dynamic:concatProtectedProperty\' requires an array value. The number of parameters or required parameters for Drupal\\config_test\\Entity\\ConfigTest::concatProtectedProperty() is not 1');
$manager->applyAction('entity_method:config_test.dynamic:concatProtectedProperty', 'config_test.dynamic.dotted.default', 'Test value');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.