You are here

protected function XMLSitemapTestHelper::assertSitemapLink in XML sitemap 7.2

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

Assert Sitemap Link.

1 call to XMLSitemapTestHelper::assertSitemapLink()
XMLSitemapI18nNodeTest::testNodeLanguageData in xmlsitemap_i18n/xmlsitemap_i18n.test
Node Language Data.

File

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

Class

XMLSitemapTestHelper
Helper test class with some added functions for testing.

Code

protected function assertSitemapLink($entity_type, $entity_id = NULL) {
  if (is_array($entity_type)) {
    $links = xmlsitemap_link_load_multiple($entity_type);
    $link = $links ? reset($links) : FALSE;
  }
  else {
    $link = xmlsitemap_link_load($entity_type, $entity_id);
  }
  $this
    ->assertTrue(is_array($link), 'Link loaded.');
  return $link;
}