protected function EntityUrlLanguageTest::createTranslatableEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Tests/EntityUrlLanguageTest.php \Drupal\language\Tests\EntityUrlLanguageTest::createTranslatableEntity()
Creates a translated entity.
1 call to EntityUrlLanguageTest::createTranslatableEntity()
- EntityUrlLanguageTest::setUp in core/
modules/ language/ src/ Tests/ EntityUrlLanguageTest.php - Performs setup tasks before each individual test method is run.
File
- core/
modules/ language/ src/ Tests/ EntityUrlLanguageTest.php, line 118 - Contains \Drupal\language\Tests\EntityUrlLanguageTest.
Class
- EntityUrlLanguageTest
- Tests the language of entity URLs. @group language
Namespace
Drupal\language\TestsCode
protected function createTranslatableEntity() {
$this->entity = EntityTest::create();
$this->entity
->addTranslation('es', [
'name' => 'name spanish',
]);
$this->entity
->addTranslation('fr', [
'name' => 'name french',
]);
$this->entity
->save();
}