You are here

public function SimplesitemapTest::testRemoveCustomLinks in Simple XML sitemap 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveCustomLinks()
  2. 4.x tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveCustomLinks()

Test removing all custom paths from the sitemap settings.

File

tests/src/Functional/SimplesitemapTest.php, line 79

Class

SimplesitemapTest
Tests Simple XML sitemap functional integration.

Namespace

Drupal\Tests\simple_sitemap\Functional

Code

public function testRemoveCustomLinks() {
  $this->generator
    ->removeCustomLinks()
    ->generateSitemap('nobatch');
  $this
    ->drupalGet('sitemap.xml');
  $this
    ->assertSession()
    ->responseNotContains(Url::fromRoute('<front>')
    ->setAbsolute()
    ->toString());
}