protected function EntityReferenceSupportedNewEntitiesConstraintValidatorTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php \Drupal\Tests\workspaces\Kernel\EntityReferenceSupportedNewEntitiesConstraintValidatorTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
modules/ workspaces/ tests/ src/ Kernel/ EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php, line 34
Class
- EntityReferenceSupportedNewEntitiesConstraintValidatorTest
- @coversDefaultClass \Drupal\workspaces\Plugin\Validation\Constraint\EntityReferenceSupportedNewEntitiesConstraintValidator @group workspaces
Namespace
Drupal\Tests\workspaces\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('user');
$this
->installSchema('system', [
'sequences',
]);
$this
->createUser();
$fields['supported_reference'] = BaseFieldDefinition::create('entity_reference')
->setSetting('target_type', 'entity_test_mulrevpub');
$fields['unsupported_reference'] = BaseFieldDefinition::create('entity_reference')
->setSetting('target_type', 'entity_test');
$this->container
->get('state')
->set('entity_test_mulrevpub.additional_base_field_definitions', $fields);
$this
->installEntitySchema('entity_test_mulrevpub');
$this
->initializeWorkspacesModule();
}