public function SimplesitemapTest::testRemoveDuplicatesSetting in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveDuplicatesSetting()
- 8.2 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testRemoveDuplicatesSetting()
Tests the duplicate setting.
Throws
\Drupal\Component\Plugin\Exception\PluginException
File
- tests/
src/ Functional/ SimplesitemapTest.php, line 298
Class
- SimplesitemapTest
- Tests Simple XML Sitemap functional integration.
Namespace
Drupal\Tests\simple_sitemap\FunctionalCode
public function testRemoveDuplicatesSetting() {
$this->generator
->entityManager()
->setBundleSettings('node', 'page');
$this->generator
->customLinkManager()
->add('/node/1');
$this->generator
->saveSetting('remove_duplicates', TRUE)
->generateSitemap(QueueWorker::GENERATE_TYPE_BACKEND);
$this
->drupalGet($this->defaultSitemapUrl);
$this
->assertUniqueTextWorkaround('node/' . $this->node
->id());
$this->generator
->saveSetting('remove_duplicates', FALSE)
->generateSitemap(QueueWorker::GENERATE_TYPE_BACKEND);
$this
->drupalGet($this->defaultSitemapUrl);
$this
->assertNoUniqueTextWorkaround('node/' . $this->node
->id());
}