function ActionValidationTest::testInvalidPluginId
Same name in other branches
- 11.x core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php \Drupal\Tests\system\Kernel\Entity\ActionValidationTest::testInvalidPluginId()
Tests that the action plugin ID is validated.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Entity/ ActionValidationTest.php, line 50
Class
- ActionValidationTest
- Tests validation of action entities.
Namespace
Drupal\Tests\system\Kernel\EntityCode
public function testInvalidPluginId() : void {
$this->entity
->set('plugin', 'non_existent');
$this->assertValidationErrors([
'plugin' => "The 'non_existent' plugin does not exist.",
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.