class ActionMethodAttributeTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Config/Action/ActionMethodAttributeTest.php \Drupal\Tests\Core\Config\Action\ActionMethodAttributeTest
Tests Drupal\Core\Config\Action\Attribute\ActionMethod.
Attributes
#[CoversClass(ActionMethod::class)]
#[Group('Config')]
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, \Prophecy\PhpUnit\ProphecyTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait, \Drupal\Tests\RandomGeneratorTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\Core\Config\Action\ActionMethodAttributeTest extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of ActionMethodAttributeTest
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Action/ ActionMethodAttributeTest.php, line 16
Namespace
Drupal\Tests\Core\Config\ActionView source
class ActionMethodAttributeTest extends UnitTestCase {
/**
* Tests invalid function name.
*
* @legacy-covers ::__construct
*/
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.