You are here

public function XMLSitemapUnitTest::testDuplicatePaths in XML sitemap 7.2

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

Test that duplicate paths are skipped during generation.

File

./xmlsitemap.test, line 782
Unit tests for the xmlsitemap.

Class

XMLSitemapUnitTest
XML Sitemap UnitTest.

Code

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