function ActionMethodAttributeTest::testInvalidFunctionName
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Config/Action/ActionMethodAttributeTest.php \Drupal\Tests\Core\Config\Action\ActionMethodAttributeTest::testInvalidFunctionName()
Tests invalid function name.
@legacy-covers ::__construct
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Action/ ActionMethodAttributeTest.php, line 25
Class
Namespace
Drupal\Tests\Core\Config\ActionCode
public function testInvalidFunctionName() : void {
$name = "hello Goodbye";
$this->expectException(InvalidPluginDefinitionException::class);
$this->expectExceptionMessage("'{$name}' is not a valid PHP function name.");
new ActionMethod(name: $name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.