protected function EntityUrlLanguageTest::createTranslatableEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php \Drupal\Tests\language\Kernel\EntityUrlLanguageTest::createTranslatableEntity()
Creates a translated entity.
1 call to EntityUrlLanguageTest::createTranslatableEntity()
- EntityUrlLanguageTest::setUp in core/
modules/ language/ tests/ src/ Kernel/ EntityUrlLanguageTest.php
File
- core/
modules/ language/ tests/ src/ Kernel/ EntityUrlLanguageTest.php, line 113
Class
- EntityUrlLanguageTest
- Tests the language of entity URLs. @group language
Namespace
Drupal\Tests\language\KernelCode
protected function createTranslatableEntity() {
$this->entity = EntityTest::create();
$this->entity
->addTranslation('es', [
'name' => 'name spanish',
]);
$this->entity
->addTranslation('fr', [
'name' => 'name french',
]);
$this->entity
->save();
}