protected function EntityReferenceFieldTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Entity/EntityReferenceFieldTest.php \Drupal\system\Tests\Entity\EntityReferenceFieldTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides EntityUnitTestBase::setUp
File
- core/
modules/ system/ src/ Tests/ Entity/ EntityReferenceFieldTest.php, line 71 - Contains \Drupal\system\Tests\Entity\EntityReferenceFieldTest.
Class
- EntityReferenceFieldTest
- Tests for the entity reference field.
Namespace
Drupal\system\Tests\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', array(
'target_bundles' => array(
$this->bundle,
),
), FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
}