You are here

protected function XmlSitemapEnginesFunctionalTest::setUp in XML sitemap 8

Same name and namespace in other branches
  1. 2.x xmlsitemap_engines/tests/src/Functional/XmlSitemapEnginesFunctionalTest.php \Drupal\Tests\xmlsitemap_engines\Functional\XmlSitemapEnginesFunctionalTest::setUp()

Overrides XmlSitemapTestBase::setUp

File

xmlsitemap_engines/tests/src/Functional/XmlSitemapEnginesFunctionalTest.php, line 40

Class

XmlSitemapEnginesFunctionalTest
Test xmlsitemap_engines functionality.

Namespace

Drupal\Tests\xmlsitemap_engines\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->admin_user = $this
    ->drupalCreateUser([
    'access content',
    'administer xmlsitemap',
  ]);
  $this->config = $this->container
    ->get('config.factory')
    ->getEditable('xmlsitemap_engines.settings');
  $this
    ->drupalLogin($this->admin_user);

  // @todo For some reason the test client does not have clean URLs while
  // the test runner does, so it causes mismatches in watchdog assertions
  // later.
  $this->submit_url = Url::fromUri('base://ping', [
    'absolute' => TRUE,
    'query' => [
      'sitemap' => '',
    ],
  ])
    ->toString() . '[sitemap]';
}