function FieldStorageConfigValidationTest::testFieldTypePluginIsValidated
Same name in other branches
- 11.x core/modules/field/tests/src/Kernel/Entity/FieldStorageConfigValidationTest.php \Drupal\Tests\field\Kernel\Entity\FieldStorageConfigValidationTest::testFieldTypePluginIsValidated()
Tests that the field type plugin's existence is validated.
File
-
core/
modules/ field/ tests/ src/ Kernel/ Entity/ FieldStorageConfigValidationTest.php, line 49
Class
- FieldStorageConfigValidationTest
- Tests validation of field_storage_config entities.
Namespace
Drupal\Tests\field\Kernel\EntityCode
public function testFieldTypePluginIsValidated() : void {
// The `type` property is immutable, so we need to clone the entity in
// order to cleanly change its immutable properties.
$this->entity = $this->entity
->createDuplicate()
->set('type', 'invalid');
$this->assertValidationErrors([
'type' => "The 'invalid' plugin does not exist.",
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.