function EntityReferenceSettingsTest::setUp
Same name in other branches
- 9 core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php \Drupal\Tests\field\Kernel\EntityReference\EntityReferenceSettingsTest::setUp()
- 8.9.x core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php \Drupal\Tests\field\Kernel\EntityReference\EntityReferenceSettingsTest::setUp()
- 10 core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php \Drupal\Tests\field\Kernel\EntityReference\EntityReferenceSettingsTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
modules/ field/ tests/ src/ Kernel/ EntityReference/ EntityReferenceSettingsTest.php, line 69
Class
- EntityReferenceSettingsTest
- Tests entity reference field settings.
Namespace
Drupal\Tests\field\Kernel\EntityReferenceCode
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('node');
$this->installEntitySchema('taxonomy_term');
$this->installEntitySchema('entity_test');
$this->nodeType = NodeType::create([
'type' => $this->randomMachineName(),
'name' => $this->randomString(),
]);
$this->nodeType
->save();
// Create a custom bundle.
$this->customBundle = 'test_bundle_' . $this->randomMachineName();
entity_test_create_bundle($this->customBundle, NULL, 'entity_test');
// Prepare the logger for collecting the expected critical error.
$this->container
->get($this->testLogServiceName)
->cleanLogs();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.