protected function XmlSitemapTestBase::assertNoSitemapLink in XML sitemap 8
Same name and namespace in other branches
- 2.x tests/src/Functional/XmlSitemapTestBase.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTestBase::assertNoSitemapLink()
Assert No Sitemap Link.
4 calls to XmlSitemapTestBase::assertNoSitemapLink()
- XmlSitemapCustomFunctionalTest::testCustomFileLinks in xmlsitemap_custom/
tests/ src/ Functional/ XmlSitemapCustomFunctionalTest.php - Test adding files as custom links.
- XmlSitemapCustomFunctionalTest::testCustomLinks in xmlsitemap_custom/
tests/ src/ Functional/ XmlSitemapCustomFunctionalTest.php - Test adding custom links with wrong/private/correct paths.
- XmlSitemapEntityFunctionalTest::testEntityLinkBundleSettingsForm in tests/
src/ Functional/ XmlSitemapEntityFunctionalTest.php - Test Entity Link Bundle Settings Form.
- XmlSitemapNodeFunctionalTest::testCron in tests/
src/ Functional/ XmlSitemapNodeFunctionalTest.php - Test the import of old nodes via cron.
File
- tests/
src/ Functional/ XmlSitemapTestBase.php, line 213
Class
- XmlSitemapTestBase
- Helper test class with some added functions for testing.
Namespace
Drupal\Tests\xmlsitemap\FunctionalCode
protected function assertNoSitemapLink($entity_type, $entity_id = NULL) {
if (is_array($entity_type)) {
$links = $this->linkStorage
->loadMultiple($entity_type);
$link = $links ? reset($links) : FALSE;
}
else {
$link = $this->linkStorage
->load($entity_type, $entity_id);
}
$this
->assertFalse($link, 'Link not loaded.');
return $link;
}