function 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() : void {
  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);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
