You are here

protected function XmlSitemapMultilingualTest::setUp in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/XmlSitemapMultilingualTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapMultilingualTest::setUp()

Set up an administrative user account and testing keys.

Overrides XmlSitemapMultilingualTestBase::setUp

File

tests/src/Functional/XmlSitemapMultilingualTest.php, line 18

Class

XmlSitemapMultilingualTest
Tests the generation of multilingual sitemaps.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalLogin($this->admin_user);
  $edit = [
    'site_default_language' => 'en',
  ];
  $this
    ->drupalPostForm('admin/config/regional/language', $edit, t('Save configuration'));

  // Enable URL language detection and selection.
  $edit = [
    'language_interface[enabled][language-url]' => '1',
  ];
  $this
    ->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
}