function LanguageNegotiationUrlTest::setUp
Overrides BrowserTestBase::setUp
File
- 
              core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationUrlTest.php, line 37  
Class
- LanguageNegotiationUrlTest
 - @coversDefaultClass \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl[[api-linebreak]] @group language
 
Namespace
Drupal\Tests\language\FunctionalCode
protected function setUp() : void {
  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->drupalGet('admin/config/regional/language/add');
  $this->submitForm([
    'predefined_langcode' => 'de',
  ], 'Add language');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.