function EntityResolverTest::setUp
Same name in other branches
- 8.9.x core/modules/serialization/tests/src/Kernel/EntityResolverTest.php \Drupal\Tests\serialization\Kernel\EntityResolverTest::setUp()
Overrides NormalizerTestBase::setUp
File
-
core/
modules/ hal/ tests/ src/ Kernel/ EntityResolverTest.php, line 36
Class
- EntityResolverTest
- Tests that entities references can be resolved.
Namespace
Drupal\Tests\hal\KernelCode
protected function setUp() : void {
parent::setUp();
// Create the test field storage.
FieldStorageConfig::create([
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_entity_reference',
'type' => 'entity_reference',
'settings' => [
'target_type' => 'entity_test_mulrev',
],
])->save();
// Create the test field.
FieldConfig::create([
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_entity_reference',
'bundle' => 'entity_test_mulrev',
])->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.