protected function LanguageNegotiationContentEntityTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
- 9 core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
File
- core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationContentEntityTest.php, line 49
Class
- LanguageNegotiationContentEntityTest
- Tests language negotiation with the language negotiator content entity.
Namespace
Drupal\Tests\language\FunctionalCode
protected function setUp() : void {
parent::setUp();
ConfigurableLanguage::create([
'id' => 'es',
])
->save();
ConfigurableLanguage::create([
'id' => 'fr',
])
->save();
// In order to reflect the changes for a multilingual site in the container
// we have to rebuild it.
$this
->rebuildContainer();
$this
->createTranslatableEntity();
$user = $this
->drupalCreateUser([
'view test entity',
]);
$this
->drupalLogin($user);
}