protected function DynamicEntityReferenceSettingsTest::setUp in Dynamic Entity Reference 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/DynamicEntityReferenceSettingsTest.php \Drupal\Tests\dynamic_entity_reference\Kernel\DynamicEntityReferenceSettingsTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ DynamicEntityReferenceSettingsTest.php, line 56
Class
- DynamicEntityReferenceSettingsTest
- Tests dynamic entity reference field settings.
Namespace
Drupal\Tests\dynamic_entity_reference\KernelCode
protected function setUp() : void {
parent::setup();
$this
->installEntitySchema('node');
$this
->installEntitySchema('taxonomy_term');
$this
->installEntitySchema('entity_test');
$this->nodeType = NodeType::create([
'type' => mb_strtolower($this
->randomMachineName()),
'name' => $this
->randomString(),
]);
$this->nodeType
->save();
$this->vocabulary = Vocabulary::create([
'vid' => mb_strtolower($this
->randomMachineName()),
'name' => $this
->randomString(),
]);
$this->vocabulary
->save();
// Create a custom bundle.
$this->customBundle = 'test_bundle_' . mb_strtolower($this
->randomMachineName());
entity_test_create_bundle($this->customBundle, NULL, 'entity_test');
}