You are here

public function SimplesitemapTest::testRemoveCustomLink in Simple XML sitemap 8.2

Test removing custom links from the sitemap.

File

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

Class

SimplesitemapTest
Tests Simple XML sitemap functional integration.

Namespace

Drupal\Tests\simple_sitemap\Functional

Code

public function testRemoveCustomLink() {
  $this->generator
    ->addCustomLink('/node/' . $this->node
    ->id())
    ->removeCustomLink('/node/' . $this->node
    ->id())
    ->generateSitemap('nobatch');
  $this
    ->drupalGet('sitemap.xml');
  $this
    ->assertSession()
    ->responseNotContains('node/' . $this->node
    ->id());
}