protected function EntityReferenceFieldTranslatedReferenceViewTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ field/ tests/ src/ Functional/ EntityReference/ EntityReferenceFieldTranslatedReferenceViewTest.php, line 132
Class
- EntityReferenceFieldTranslatedReferenceViewTest
- Tests the translation of entity reference field display on nodes.
Namespace
Drupal\Tests\field\Functional\EntityReferenceCode
protected function setUp() {
parent::setUp();
$this->labelOfNotTranslatedReference = $this
->randomMachineName();
$this->originalLabel = $this
->randomMachineName();
$this->translatedLabel = $this
->randomMachineName();
$this
->setUpLanguages();
// We setup languages, so we need to ensure that the language manager
// and language path processor is updated.
$this
->rebuildContainer();
$this
->setUpContentTypes();
$this
->enableTranslation();
$this
->setUpEntityReferenceField();
$this
->createContent();
$this->webUser = $this
->drupalCreateUser([
'edit any ' . $this->referrerType
->id() . ' content',
]);
}