You are here

function XMLSitemapUnitTest::testDuplicatePaths in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.test \XMLSitemapUnitTest::testDuplicatePaths()

Test that duplicate paths are skipped during generation.

File

./xmlsitemap.test, line 663
Unit tests for the xmlsitemap module.

Class

XMLSitemapUnitTest

Code

function testDuplicatePaths() {
  $link1 = $this
    ->addSitemapLink(array(
    'loc' => 'duplicate',
  ));
  $link2 = $this
    ->addSitemapLink(array(
    'loc' => 'duplicate',
  ));
  $this
    ->regenerateSitemap();
  $this
    ->drupalGetSitemap();
  $this
    ->assertUniqueText('duplicate');
}