function EntityReferenceSupportedNewEntitiesConstraintValidatorTest::setUp
Same name in other branches
- 9 core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php \Drupal\Tests\workspaces\Kernel\EntityReferenceSupportedNewEntitiesConstraintValidatorTest::setUp()
- 8.9.x core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php \Drupal\Tests\workspaces\Kernel\EntityReferenceSupportedNewEntitiesConstraintValidatorTest::setUp()
- 10 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 43
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->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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.