You are here

protected function XmlSitemapTestBase::assertNoRawSitemapLinks in XML sitemap 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/XmlSitemapTestBase.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTestBase::assertNoRawSitemapLinks()

Assert No Raw Sitemap Links.

1 call to XmlSitemapTestBase::assertNoRawSitemapLinks()
XmlSitemapMultilingualTest::testLanguageSelection in tests/src/Functional/XmlSitemapMultilingualTest.php
Test Language Selection.

File

tests/src/Functional/XmlSitemapTestBase.php, line 317

Class

XmlSitemapTestBase
Helper test class with some added functions for testing.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function assertNoRawSitemapLinks() {
  $links = func_get_args();
  foreach ($links as $link) {
    $path = Url::fromUri('internal:' . $link['loc'], [
      'language' => xmlsitemap_language_load($link['language']),
      'absolute' => TRUE,
    ])
      ->toString();
    $this
      ->assertSession()
      ->responseNotContains($link['loc']);
  }
}