public function SimplesitemapTest::testRemoveDuplicatesSetting in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveDuplicatesSetting()
- 4.x tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveDuplicatesSetting()
Tests the duplicate setting.
@todo On second generation too many links in XML output here?
File
- tests/
src/ Functional/ SimplesitemapTest.php, line 208
Class
- SimplesitemapTest
- Tests Simple XML sitemap functional integration.
Namespace
Drupal\Tests\simple_sitemap\FunctionalCode
public function testRemoveDuplicatesSetting() {
$this->generator
->setBundleSettings('node', 'page', [
'index' => TRUE,
])
->addCustomLink('/node/1')
->saveSetting('remove_duplicates', TRUE)
->generateSitemap('nobatch');
$this
->drupalGet('sitemap.xml');
$this
->assertUniqueTextWorkaround('node/' . $this->node
->id());
$this->generator
->saveSetting('remove_duplicates', FALSE)
->generateSitemap('nobatch');
$this
->drupalGet('sitemap.xml');
$this
->assertNoUniqueTextWorkaround('node/' . $this->node
->id());
}