You are here

public function XmlSitemapListBuilderTest::testDefaultSitemap in XML sitemap 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/XmlSitemapListBuilderTest.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapListBuilderTest::testDefaultSitemap()

Test if the default sitemap exists.

File

tests/src/Functional/XmlSitemapListBuilderTest.php, line 68

Class

XmlSitemapListBuilderTest
Tests the sitemaps list builder.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

public function testDefaultSitemap() {
  $this
    ->drupalLogin($this->admin_user);
  $context = [];
  $id = xmlsitemap_sitemap_get_context_hash($context);
  $this
    ->drupalGet('admin/config/search/xmlsitemap');
  $this
    ->assertSession()
    ->pageTextContains($id);
}