You are here

protected function XMLSitemapTestHelper::assertSitemapLink in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.test \XMLSitemapTestHelper::assertSitemapLink()
1 call to XMLSitemapTestHelper::assertSitemapLink()
XMLSitemapI18nNodeTest::testNodeLanguageData in xmlsitemap_i18n/xmlsitemap_i18n.test

File

./xmlsitemap.test, line 95
Unit tests for the xmlsitemap module.

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;
}