protected function LanguageNegotiationUrlTest::setUp in Drupal 8
Same name in this branch
- 8 core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php \Drupal\Tests\language\Functional\LanguageNegotiationUrlTest::setUp()
- 8 core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php \Drupal\Tests\language\Unit\LanguageNegotiationUrlTest::setUp()
Same name and namespace in other branches
- 9 core/modules/language/tests/src/Functional/LanguageNegotiationUrlTest.php \Drupal\Tests\language\Functional\LanguageNegotiationUrlTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationUrlTest.php, line 38
Class
- LanguageNegotiationUrlTest
- @coversDefaultClass \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl @group language
Namespace
Drupal\Tests\language\FunctionalCode
protected function setUp() {
parent::setUp();
// Create an Article node type.
if ($this->profile != 'standard') {
$this
->drupalCreateContentType([
'type' => 'article',
]);
}
$this->user = $this
->drupalCreateUser([
'administer languages',
'access administration pages',
'view the administration theme',
'administer nodes',
'create article content',
'create url aliases',
]);
$this
->drupalLogin($this->user);
$this
->drupalPostForm('admin/config/regional/language/add', [
'predefined_langcode' => 'de',
], $this
->t('Add language'));
}