protected function LanguageNegotiationContentEntityTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
- 10 core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationContentEntityTest.php, line 50
Class
- LanguageNegotiationContentEntityTest
- Tests language negotiation with the language negotiator content entity.
Namespace
Drupal\Tests\language\FunctionalCode
protected function setUp() {
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);
}