public function DynamicEntityHooksTest::testUnexpectedEntityTypeId in Field Encryption 3.0.x
Tests _field_encrypt_entity_hooks().
File
- tests/
src/ Kernel/ DynamicEntityHooksTest.php, line 22
Class
- DynamicEntityHooksTest
- Tests dynamic entity hook creation.
Namespace
Drupal\Tests\field_encrypt\KernelCode
public function testUnexpectedEntityTypeId() {
$this->container
->get('state')
->set('field_encrypt.entity_types', [
'; do_something_bad();',
]);
$this
->expectException(\RuntimeException::class);
$this
->expectExceptionMessage('"; do_something_bad();" entity type contains unexpected characters');
_field_encrypt_entity_hooks();
}