Commit bd89f6f0 authored by amateescu's avatar amateescu
Browse files

Fix all the tests.

parent ce0bf882
......@@ -12,3 +12,4 @@ clean_url: 0
cron_threshold_error: 1209600
cron_threshold_warning: 172800
disable_cron_regeneration: false
i18n_selection_mode: 'simple'
......@@ -46,6 +46,23 @@ xmlsitemap.settings:
disable_cron_regeneration:
type: boolean
label: 'Disable cron generation of sitemap files'
i18n_selection_mode:
type: string
label: 'Language selection mode'
xmlsitemap.settings.*.*:
type: config_object
label: 'XML sitemap entity bundle settings'
mapping:
status:
type: boolean
label: 'Status of the bundle'
priority:
type: float
label: 'Priority of the bundle'
changefreq:
type: integer
label: 'Change frequency of the bundle'
xmlsitemap.*:
type: config_entity
......@@ -67,9 +84,8 @@ xmlsitemap.*:
type: integer
label: 'Maximum filesize of the sitemap'
context:
type: mapping
type: ignore
label: 'Context of the sitemap'
updated:
type: integer
label: 'Last time sitemap was updated'
......@@ -87,7 +87,7 @@ class XmlSitemapEntitiesSettingsForm extends ConfigFormBase implements Container
$bundles = $this->entityTypeBundleInfo->getAllBundleInfo();
foreach ($entity_types as $entity_type_id => $entity_type) {
if (!$entity_type instanceof ContentEntityTypeInterface) {
if (!$entity_type instanceof ContentEntityTypeInterface || !isset($bundles[$entity_type_id])) {
continue;
}
......
......@@ -2,6 +2,10 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Session\AccountInterface;
use Drupal\entity_test\Entity\EntityTestMul;
use Drupal\user\Entity\Role;
/**
* Tests the generation of a random content entity links.
*
......@@ -12,7 +16,7 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['node', 'system', 'entity_test'];
public static $modules = ['entity_test'];
/**
* {@inheritdoc}
......@@ -22,8 +26,8 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$this->admin_user = $this->drupalCreateUser(array('administer entity_test content', 'administer xmlsitemap'));
// allow anonymous user to view entity
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
// Allow anonymous users to view test entities.
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->grantPermission('view test entity');
$user_role->save();
}
......@@ -35,29 +39,27 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$this->drupalLogin($this->admin_user);
$this->drupalGet('admin/config/search/xmlsitemap/entities/settings');
$this->assertResponse(200);
$this->assertField('entity_types[entity_test]');
$this->assertField('settings[entity_test][types][entity_test]');
$this->assertField('entity_types[entity_test_mul]');
$this->assertField('settings[entity_test_mul][types][entity_test_mul]');
$edit = array(
'entity_types[entity_test]' => 1,
'settings[entity_test][types][entity_test]' => 1,
'entity_types[entity_test_mul]' => 1,
'settings[entity_test_mul][types][entity_test_mul]' => 1,
);
$this->drupalPostForm(NULL, $edit, t('Save'));
$this->assertText(t('The configuration options have been saved.'));
$entity = entity_create('entity_test', array(
'bundle' => 'entity_test',
));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test', $entity->id(), array('status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 1));
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), array('status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 1));
}
/**
* Test the form at admin/config/search/xmlsitemap/settings/{entity_type_id}/{bundle_id}.
*/
public function testEntityLinkBundleSettingsForm() {
xmlsitemap_link_bundle_enable('entity_test', 'entity_test');
xmlsitemap_link_bundle_enable('entity_test_mul', 'entity_test_mul');
$this->drupalLogin($this->admin_user);
// set priority and inclusion for entity_test - entity_test
$this->drupalGet('admin/config/search/xmlsitemap/settings/entity_test/entity_test');
// set priority and inclusion for entity_test_mul - entity_test_mul
$this->drupalGet('admin/config/search/xmlsitemap/settings/entity_test_mul/entity_test_mul');
$this->assertResponse(200);
$this->assertField('xmlsitemap[status]');
$this->assertField('xmlsitemap[priority]');
......@@ -68,32 +70,27 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
'xmlsitemap[changefreq]' => XMLSITEMAP_FREQUENCY_WEEKLY,
);
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
$entity = entity_create('entity_test', array(
'bundle' => 'entity_test',
));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test', $entity->id(), array('status' => 0, 'priority' => 0.3, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY, 'access' => 1));
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), array('status' => 0, 'priority' => 0.3, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY, 'access' => 1));
$this->regenerateSitemap();
$this->drupalGet('sitemap.xml');
$this->assertResponse(200);
$this->assertNoText($entity->url());
$id = $entity->id();
$entity->delete();
$this->assertNoSitemapLink('entity_test');
$this->assertNoSitemapLink('entity_test_mul');
$edit = array(
'xmlsitemap[status]' => 1,
'xmlsitemap[priority]' => 0.6,
'xmlsitemap[changefreq]' => XMLSITEMAP_FREQUENCY_YEARLY,
);
$this->drupalPostForm('admin/config/search/xmlsitemap/settings/entity_test/entity_test', $edit, t('Save configuration'));
$entity = entity_create('entity_test', array(
'bundle' => 'entity_test',
));
$this->drupalPostForm('admin/config/search/xmlsitemap/settings/entity_test_mul/entity_test_mul', $edit, t('Save configuration'));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test', $entity->id(), array('status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_YEARLY, 'access' => 1));
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), array('status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_YEARLY, 'access' => 1));
$this->regenerateSitemap();
$this->drupalGet('sitemap.xml');
......@@ -102,22 +99,20 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$id = $entity->id();
$entity->delete();
$this->assertNoSitemapLink('entity_test', $id);
$this->assertNoSitemapLink('entity_test_mul', $id);
}
public function testUserCannotViewEntity() {
// allow anonymous user to view entity
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
// Disallow anonymous users to view test entities.
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->revokePermission('view test entity');
$user_role->save();
xmlsitemap_link_bundle_enable('entity_test', 'entity_test');
xmlsitemap_link_bundle_enable('entity_test_mul', 'entity_test_mul');
$entity = entity_create('entity_test', array(
'bundle' => 'entity_test',
));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test', $entity->id(), array('status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 0));
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), array('status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 0));
}
}
......@@ -12,7 +12,7 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['path', 'node', 'system', 'user', 'help'];
public static $modules = ['path', 'help'];
/**
* {@inheritdoc}
......
......@@ -14,7 +14,7 @@ class XmlSitemapListBuilderTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'node', 'locale', 'content_translation', 'system'];
public static $modules = ['language', 'locale', 'content_translation'];
/**
* {@inheritdoc}
......@@ -96,7 +96,7 @@ class XmlSitemapListBuilderTest extends XmlSitemapTestBase {
foreach ($sitemaps as $sitemap) {
$label = $sitemap->label();
$this->drupalPostForm("admin/config/search/xmlsitemap/{$sitemap->id()}/delete", array(), t('Delete'));
$this->assertRaw(t("Sitemap :label has been deleted.", array(':label' => $label)));
$this->assertRaw(t("Sitemap %label has been deleted.", array('%label' => $label)));
}
$sitemaps = entity_load_multiple('xmlsitemap');
......
......@@ -2,7 +2,9 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Session\AccountInterface;
use Drupal\Component\Utility\Unicode;
use Drupal\user\Entity\Role;
/**
* Tests the generation of menu links.
......@@ -14,7 +16,7 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['node', 'menu_link_content', 'menu_ui', 'system'];
public static $modules = ['menu_link_content', 'menu_ui'];
/**
* {@inheritdoc}
......@@ -22,21 +24,8 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
if ($this->profile != 'standard') {
$this->drupalCreateContentType(array(
'type' => 'page',
'name' => 'Basic page',
'settings' => array(
// Set proper default options for the page content type.
'node' => array(
'options' => array('promote' => FALSE),
'submitted' => FALSE,
), )));
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
}
// allow anonymous user to administer menu links
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->grantPermission('administer menu');
$user_role->grantPermission('access content');
$user_role->save();
......@@ -74,7 +63,7 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
$menu_id = $edit['id'];
$this->clickLink('Add link');
$edit = array(
'url' => 'node',
'link[0][uri]' => 'node',
'title[0][value]' => $this->randomMachineName(),
'description[0][value]' => '',
'enabled[value]' => 1,
......
......@@ -2,6 +2,9 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Session\AccountInterface;
use Drupal\user\Entity\Role;
/**
* Tests the generation of multilingual nodes.
*
......@@ -12,7 +15,7 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'content_translation', 'node', 'locale', 'config_translation', 'system'];
public static $modules = ['config_translation'];
/**
* {@inheritdoc}
......@@ -20,19 +23,6 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
protected function setUp() {
parent::setUp();
if ($this->profile != 'standard') {
$this->drupalCreateContentType(array(
'type' => 'page',
'name' => 'Basic page',
'settings' => array(
// Set proper default options for the page content type.
'node' => array(
'options' => array('promote' => FALSE),
'submitted' => FALSE,
), )));
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
}
$this->admin_user = $this->drupalCreateUser(array('administer nodes', 'administer languages', 'administer content types', 'access administration pages', 'create page content', 'edit own page content'));
$this->drupalLogin($this->admin_user);
......@@ -41,13 +31,13 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
xmlsitemap_link_bundle_enable('node', 'page');
// allow anonymous user to view user profiles
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->grantPermission('access content');
$user_role->save();
// Set "Basic page" content type to use multilingual support.
$edit = array(
'language_configuration[language_show]' => TRUE,
'language_configuration[language_alterable]' => TRUE,
);
$this->drupalPostForm('admin/structure/types/manage/page', $edit, t('Save content type'));
$this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Basic page')), 'Basic page content type has been updated.');
......@@ -60,11 +50,11 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
$this->drupalLogin($this->admin_user);
$node = $this->drupalCreateNode(array());
$this->drupalPostForm('node/' . $node->id() . '/edit', array('langcode' => 'en'), t('Save and keep published'));
$this->drupalPostForm('node/' . $node->id() . '/edit', array('langcode[0][value]' => 'en'), t('Save and keep published'));
$link = $this->assertSitemapLink('node', $node->id(), array('status' => 0, 'access' => 1));
$this->assertIdentical($link['language'], 'en');
$this->drupalPostForm('node/' . $node->id() . '/edit', array('langcode' => 'fr'), t('Save and keep published'));
$this->drupalPostForm('node/' . $node->id() . '/edit', array('langcode[0][value]' => 'fr'), t('Save and keep published'));
$link = $this->assertSitemapLink('node', $node->id(), array('status' => 0, 'access' => 1));
$this->assertIdentical($link['language'], 'fr');
}
......
......@@ -11,11 +11,6 @@ use Drupal\Core\Language\LanguageInterface;
*/
class XmlSitemapMultilingualTest extends XmlSitemapMultilingualTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'node', 'locale', 'content_translation', 'system'];
/**
* {@inheritdoc}
*/
......@@ -26,7 +21,8 @@ class XmlSitemapMultilingualTest extends XmlSitemapMultilingualTestBase {
$edit = array(
'site_default_language' => 'en',
);
$this->drupalPostForm('admin/config/regional/settings', $edit, t('Save configuration'));
$this->drupalPostForm('admin/config/regional/language', $edit, t('Save configuration'));
// Enable URL language detection and selection.
$edit = array('language_interface[enabled][language-url]' => '1');
$this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
......
......@@ -2,20 +2,18 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Language\Language;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\xmlsitemap\Entity\XmlSitemap;
/**
* Common base test class for XML sitemap internationalization tests.
*
* @group xmlsitemap
*/
abstract class XmlSitemapMultilingualTestBase extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'node', 'locale', 'content_translation', 'system'];
public static $modules = ['language', 'locale', 'content_translation'];
/**
* Set up an administrative user account and testing keys.
......@@ -29,23 +27,16 @@ abstract class XmlSitemapMultilingualTestBase extends XmlSitemapTestBase {
if (!$this->languageManager->getLanguage('fr')) {
// Add a new language.
$language = new Language(array(
'id' => 'fr',
'name' => 'French',
));
language_save($language);
ConfigurableLanguage::createFromLangcode('fr')->save();
}
if (!$this->languageManager->getLanguage('en')) {
// Add a new language.
$language = new Language(array(
'id' => 'en',
'name' => 'English',
));
language_save($language);
ConfigurableLanguage::createFromLangcode('en')->save();
}
// Create the two different language-context sitemaps.
$previous_sitemaps = entity_load_multiple('xmlsitemap');
$previous_sitemaps = XmlSitemap::loadMultiple();
foreach ($previous_sitemaps as $previous_sitemap) {
$previous_sitemap->delete();
}
......
......@@ -2,7 +2,12 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\user\Entity\Role;
/**
* Tests the generation of node links.
......@@ -14,7 +19,7 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['node', 'taxonomy'];
public static $modules = ['taxonomy'];
/**
* Nodes created during the test for testCron() method.
......@@ -29,32 +34,19 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
if ($this->profile != 'standard') {
$this->drupalCreateContentType(array(
'type' => 'page',
'name' => 'Basic page',
'settings' => array(
// Set proper default options for the page content type.
'node' => array(
'options' => array('promote' => FALSE),
'submitted' => FALSE,
), )));
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
}
$this->admin_user = $this->drupalCreateUser(array('administer nodes', 'bypass node access', 'administer content types', 'administer xmlsitemap', 'administer taxonomy'));
$this->normal_user = $this->drupalCreateUser(array('create page content', 'edit any page content', 'access content', 'view own unpublished content'));
// allow anonymous user to view user profiles
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->grantPermission('access content');
$user_role->save();
xmlsitemap_link_bundle_enable('node', 'article');
xmlsitemap_link_bundle_enable('node', 'page');
$this->config->set('xmlsitemap_entity_taxonomy_vocabulary', 1);
$this->config->set('xmlsitemap_entity_taxonomy_term', 1);
$this->config->save();
// $this->config->set('xmlsitemap_entity_taxonomy_vocabulary', 1);
// $this->config->set('xmlsitemap_entity_taxonomy_term', 1);
// $this->config->save();
xmlsitemap_link_bundle_settings_save('node', 'page', array('status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY));
// Add a vocabulary so we can test different view modes.
......@@ -70,41 +62,37 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
xmlsitemap_link_bundle_enable('taxonomy_term', 'tags');
// Set up a field and instance.
$field_name = 'tags';
entity_create('field_storage_config', array(
'name' => $field_name,
FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'node',
'type' => 'taxonomy_term_reference',
'type' => 'entity_reference',
'settings' => array(
'allowed_values' => array(
array(
'vocabulary' => $vocabulary->vid,
'parent' => '0',
),
),
'target_type' => 'taxonomy_term',
),
'cardinality' => '-1',
))->save();
entity_create('field_instance_config', array(
'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
])->save();
FieldConfig::create([
'field_name' => $field_name,
'entity_type' => 'node',
'bundle' => 'page',
))->save();
])->save();
entity_get_form_display('node', 'page', 'default')
->setComponent($field_name, array(
'type' => 'taxonomy_autocomplete',
'type' => 'entity_reference_autocomplete_tags',
))
->save();
// Show on default display and teaser.
entity_get_display('node', 'page', 'default')
->setComponent($field_name, array(
'type' => 'taxonomy_term_reference_link',
'type' => 'entity_reference_label',
))
->save();
entity_get_display('node', 'page', 'teaser')
->setComponent($field_name, array(
'type' => 'taxonomy_term_reference_link',
'type' => 'entity_reference_label',
))
->save();
}
......@@ -119,7 +107,7 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
$edit = array();
$edit[$title_key] = $this->randomMachineName(8);
$edit[$body_key] = $this->randomMachineName(16);
$edit['tags'] = 'tag1, tag2, tag3';
$edit['tags[target_id]'] = 'tag1, tag2, tag3';
$this->drupalPostForm('node/add/page', $edit, t('Save and publish'));
$tags = entity_load_multiple('taxonomy_term');
......@@ -198,25 +186,13 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
$this->assertSitemapLinkValues('node', $node->id(), array('status' => 0, 'priority' => 0.0));
$this->assertSitemapLinkValues('node', $node_old->id(), array('status' => 0, 'priority' => 0.0));
$edit = array(
'type' => 'page2',
);
$this->drupalPostForm('admin/structure/types/manage/page', $edit, t('Save content type'));
$this->assertText('Changed the content type of 2 posts from page to page2.');
$this->assertText('The content type Basic page has been updated.');
$this->assertSitemapLinkValues('node', $node->id(), array('subtype' => 'page2', 'status' => 0, 'priority' => 0.0));
$this->assertSitemapLinkValues('node', $node_old->id(), array('subtype' => 'page2', 'status' => 0, 'priority' => 0.0));
$this->assertEqual(count($this->linkStorage->loadMultiple(array('type' => 'node', 'subtype' => 'page'))), 0);
$this->assertEqual(count($this->linkStorage->loadMultiple(array('type' => 'node', 'subtype' => 'page2'))), 2);
// delete all pages in order to allow content type deletion
// Delete all pages in order to allow content type deletion.
$node->delete();
$node_old->delete();
$this->drupalPostForm('admin/structure/types/manage/page2/delete', array(), t('Delete'));
$this->drupalPostForm('admin/structure/types/manage/page/delete', array(), t('Delete'));
$this->assertText('The content type Basic page has been deleted.');
$this->assertFalse($this->linkStorage->loadMultiple(array('type' => 'node', 'subtype' => 'page2')), 'Nodes with deleted node type removed from {xmlsitemap}.');
$this->assertFalse($this->linkStorage->loadMultiple(array('type' => 'node', 'subtype' => 'page')), 'Nodes with deleted node type removed from {xmlsitemap}.');
}
/**
......
<?php
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Session\AccountInterface;
use Drupal\user\Entity\Role;
/**
* Tests the rebuild process of sitemaps.
......@@ -12,7 +14,7 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['path', 'node', 'system', 'user', 'help', 'block'];
public static $modules = ['path', 'help', 'block'];
/**
* {@inheritdoc}
......@@ -22,10 +24,10 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase {
$this->admin_user = $this->drupalCreateUser(array('administer xmlsitemap', 'access administration pages', 'access site reports', 'administer users', 'administer permissions'));
$this->drupalPlaceBlock('system_help_block', array('region' => 'help'));
$this->drupalPlaceBlock('help_block', array('region' => 'help'));
// allow anonymous user to view user profiles
$user_role = entity_load('user_role', DRUPAL_ANONYMOUS_RID);
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
$user_role->grantPermission('access user profiles');
$user_role->save();
}
......
......@@ -5,7 +5,7 @@ namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Url;
/**
* Tests the robots.txt file existance.
* Tests the robots.txt file existence.
*
* @group xmlsitemap
* @dependencies robotstxt
......@@ -28,7 +28,7 @@ class XmlSitemapRobotsTxtIntegrationTest extends XmlSitemapTestBase {
return;
}
$this->drupalGet('/robots.txt');
$this->assertRaw('Sitemap: ' . Url::fromRoute('xmlsitemap.sitemap_xml', [], array('absolute' => TRUE)));
$this->assertRaw('Sitemap: ' . Url::fromRoute('xmlsitemap.sitemap_xml', [], ['absolute' => TRUE])