function ActionMethodAttributeTest::testInvalidFunctionName
@covers ::__construct
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Action/ ActionMethodAttributeTest.php, line 20
Class
- ActionMethodAttributeTest
- @coversDefaultClass \Drupal\Core\Config\Action\Attribute\ActionMethod @group Config
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.