protected function EntityReferenceFieldTranslatedReferenceViewTest::createNotTranslatedReferencedEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php \Drupal\field\Tests\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest::createNotTranslatedReferencedEntity()
Create the referenced entity.
1 call to EntityReferenceFieldTranslatedReferenceViewTest::createNotTranslatedReferencedEntity()
- EntityReferenceFieldTranslatedReferenceViewTest::createContent in core/
modules/ field/ src/ Tests/ EntityReference/ EntityReferenceFieldTranslatedReferenceViewTest.php - Creates a test subject contents, with translation.
File
- core/
modules/ field/ src/ Tests/ EntityReference/ EntityReferenceFieldTranslatedReferenceViewTest.php, line 283 - Contains \Drupal\field\Tests\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest.
Class
- EntityReferenceFieldTranslatedReferenceViewTest
- Tests the translation of entity reference field display on nodes.
Namespace
Drupal\field\Tests\EntityReferenceCode
protected function createNotTranslatedReferencedEntity() {
/** @var \Drupal\node\Entity\Node $node */
$node = entity_create($this->testEntityTypeName, array(
'title' => $this->labelOfNotTranslatedReference,
'type' => $this->referencedType
->id(),
'description' => array(
'value' => $this
->randomMachineName(),
'format' => 'basic_html',
),
'langcode' => $this->baseLangcode,
));
$node
->save();
return $node;
}