function LanguageNegotiationContentEntityTest::setUp
Same name in this branch
- 11.x core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Unit\Plugin\LanguageNegotiation\LanguageNegotiationContentEntityTest::setUp()
Same name in other branches
- 9 core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
- 8.9.x core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Functional\LanguageNegotiationContentEntityTest::setUp()
- 10 core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php \Drupal\Tests\language\Unit\Plugin\LanguageNegotiation\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 51
Class
- LanguageNegotiationContentEntityTest
- Tests language negotiation with the language negotiator content entity.
Namespace
Drupal\Tests\language\FunctionalCode
protected function setUp() : void {
parent::setUp();
ConfigurableLanguage::createFromLangcode('es')->save();
ConfigurableLanguage::createFromLangcode('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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.