You are here

protected function XmlSitemapTestBase::assertSitemapLinkNotVisible in XML sitemap 8

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

Assert Sitemap Link Not Visible.

1 call to XmlSitemapTestBase::assertSitemapLinkNotVisible()
XmlSitemapUserFunctionalTest::testBlockedUser in tests/src/Functional/XmlSitemapUserFunctionalTest.php
Test sitemap link for a blocked user.

File

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

Class

XmlSitemapTestBase
Helper test class with some added functions for testing.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function assertSitemapLinkNotVisible($entity_type, $entity_id) {
  $link = $this->linkStorage
    ->load($entity_type, $entity_id);
  $this
    ->assertTrue($link && !($link['access'] && $link['status']), t('Sitemap link @type @id is not visible.', [
    '@type' => $entity_type,
    '@id' => $entity_id,
  ]));
}