protected function EntityReferenceFieldTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php \Drupal\KernelTests\Core\Entity\EntityReferenceFieldTest::setUp()
Overrides EntityKernelTestBase::setUp
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityReferenceFieldTest.php, line 67
Class
- EntityReferenceFieldTest
- Tests for the entity reference field.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('entity_test_rev');
// Create a field.
$this
->createEntityReferenceField($this->entityType, $this->bundle, $this->fieldName, 'Field test', $this->referencedEntityType, 'default', [
'target_bundles' => [
$this->bundle,
],
], FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
}