Commit c2b5612f authored by RenatoG's avatar RenatoG Committed by RenatoG
Browse files

Issue #2908025 by RenatoG: Fixed all items of Drupal Code Sniffer for src folder

parent d573fe32
......@@ -11,6 +11,8 @@ use Drupal\Core\State\StateInterface;
use Drupal\Core\Template\TwigEnvironment;
/**
* Class for Xml Sitemap Controller.
*
* Returns responses for xmlsitemap.sitemap_xml and xmlsitemap.sitemap_xsl
* routes.
*/
......@@ -35,6 +37,8 @@ class XmlSitemapController extends ControllerBase {
*
* @param \Drupal\Core\State\StateInterface $state
* The state service.
* @param Drupal\Core\Template\TwigEnvironment $twig
* Twig environment for Drupal.
*/
public function __construct(StateInterface $state, TwigEnvironment $twig) {
$this->state = $state;
......
......@@ -13,8 +13,12 @@ class XmlSitemapDeleteForm extends EntityConfirmFormBase {
/**
* {@inheritdoc}
*
* @codingStandardsIgnoreStart
*/
public function getBaseFormID() {
// @codingStandardsIgnoreEnd
return 'xmlsitemap_delete_form';
}
......
......@@ -2,13 +2,11 @@
namespace Drupal\xmlsitemap\Form;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Session\AnonymousUserSession;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
......@@ -89,7 +87,7 @@ class XmlSitemapEntitiesSettingsForm extends ConfigFormBase implements Container
continue;
}
$labels[$entity_type_id] = $entity_type->getLabel() ? : $entity_type_id;
$labels[$entity_type_id] = $entity_type->getLabel() ?: $entity_type_id;
}
asort($labels);
......
......@@ -12,8 +12,10 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
*/
class XmlSitemapLinkBundleSettingsForm extends ConfigFormBase {
// @codingStandardsIgnoreStart
private $entity_type;
private $bundle_type;
// @codingStandardsIgnoreEnd
/**
* {@inheritdoc}
......@@ -96,8 +98,8 @@ class XmlSitemapLinkBundleSettingsForm extends ConfigFormBase {
}
// Unset the form values since we have already saved the bundle settings and
// we don't want these values to get saved as configuration, depending on how
// the form saves the form values.
// we don't want these values to get saved as configuration, depending on
// how the form saves the form values.
$form_state->unsetValue('xmlsitemap');
parent::submitForm($form, $form_state);
}
......
......@@ -70,7 +70,9 @@ class XmlSitemapRebuildForm extends ConfigFormBase {
}
else {
$request->query->set('destination', 'admin/config/search/xmlsitemap');
drupal_set_message(t('A rebuild is not necessary. If you are just wanting to regenerate the XML sitemap files, you can <a href="@link-cron">run cron manually</a>.', ['@link-cron' => Url::fromRoute('system.run_cron', [], ['query' => drupal_get_destination()])]), 'warning');
drupal_set_message(t('A rebuild is not necessary. If you are just wanting to regenerate the XML sitemap files, you can <a href="@link-cron">run cron manually</a>.', [
'@link-cron' => Url::fromRoute('system.run_cron', [], ['query' => drupal_get_destination()]),
]), 'warning');
$this->setRequest($request);
}
}
......
......@@ -63,10 +63,7 @@ class XmlSitemapSettingsForm extends ConfigFormBase {
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('state'),
$container->get('date.formatter'),
$container->get('xmlsitemap.link_storage')
$container->get('config.factory'), $container->get('state'), $container->get('date.formatter'), $container->get('xmlsitemap.link_storage')
);
}
......@@ -89,7 +86,19 @@ class XmlSitemapSettingsForm extends ConfigFormBase {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('xmlsitemap.settings');
$intervals = [300, 900, 1800, 3600, 10800, 21600, 43200, 86400, 172800, 259200, 604800];
$intervals = [
300,
900,
1800,
3600,
10800,
21600,
43200,
86400,
172800,
259200,
604800,
];
$intervals = array_combine($intervals, $intervals);
$format_intervals = [];
foreach ($intervals as $key => $value) {
......@@ -128,7 +137,16 @@ class XmlSitemapSettingsForm extends ConfigFormBase {
'#default_value' => $config->get('gz'),
'#disabled' => !function_exists('gzencode'),
];
$chunk_sizes = [100, 500, 1000, 2500, 5000, 10000, 25000, XMLSITEMAP_MAX_SITEMAP_LINKS];
$chunk_sizes = [
100,
500,
1000,
2500,
5000,
10000,
25000,
XMLSITEMAP_MAX_SITEMAP_LINKS,
];
$form['advanced']['chunk_size'] = [
'#type' => 'select',
'#title' => t('Number of links in each sitemap page'),
......@@ -258,7 +276,14 @@ class XmlSitemapSettingsForm extends ConfigFormBase {
$values = $form_state->getValues();
if (isset($form['frontpage'])) {
$this->linkStorage->save(['type' => 'frontpage', 'id' => 0, 'loc' => '', 'subtype' => '', 'priority' => $values['frontpage_priority'], 'changefreq' => $values['frontpage_changefreq']]);
$this->linkStorage->save([
'type' => 'frontpage',
'id' => 0,
'loc' => '',
'subtype' => '',
'priority' => $values['frontpage_priority'],
'changefreq' => $values['frontpage_changefreq'],
]);
}
$this->state->set('xmlsitemap_developer_mode', $values['xmlsitemap_developer_mode']);
$this->state->set('xmlsitemap_base_url', $values['xmlsitemap_base_url']);
......
......@@ -49,11 +49,19 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$this->assertText(t('The configuration options have been saved.'));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), ['status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 1]);
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), [
'status' => 0,
'priority' => 0.5,
'changefreq' => 0,
'access' => 1,
]);
}
/**
* Test the form at admin/config/search/xmlsitemap/settings/{entity_type_id}/{bundle_id}.
* Test Entity Link Bundle Settings Form.
*
* Test the form at
* admin/config/search/xmlsitemap/settings/{entity_type_id}/{bundle_id}.
*/
public function testEntityLinkBundleSettingsForm() {
xmlsitemap_link_bundle_enable('entity_test_mul', 'entity_test_mul');
......@@ -72,7 +80,12 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), ['status' => 0, 'priority' => 0.3, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY, 'access' => 1]);
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), [
'status' => 0,
'priority' => 0.3,
'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY,
'access' => 1,
]);
$this->regenerateSitemap();
$this->drupalGet('sitemap.xml');
......@@ -90,7 +103,12 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$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_mul', $entity->id(), ['status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_YEARLY, 'access' => 1]);
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), [
'status' => 1,
'priority' => 0.6,
'changefreq' => XMLSITEMAP_FREQUENCY_YEARLY,
'access' => 1,
]);
$this->regenerateSitemap();
$this->drupalGet('sitemap.xml');
......@@ -103,7 +121,7 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
}
/**
*
* Test User Cannot View Entity.
*/
public function testUserCannotViewEntity() {
// Disallow anonymous users to view test entities.
......@@ -115,7 +133,12 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase {
$entity = EntityTestMul::create();
$entity->save();
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), ['status' => 0, 'priority' => 0.5, 'changefreq' => 0, 'access' => 0]);
$this->assertSitemapLinkValues('entity_test_mul', $entity->id(), [
'status' => 0,
'priority' => 0.5,
'changefreq' => 0,
'access' => 0,
]);
}
}
......@@ -20,7 +20,9 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['access content', 'administer site configuration', 'administer xmlsitemap', 'access administration pages', 'access site reports', 'administer permissions', 'view the administration theme']);
$this->admin_user = $this->drupalCreateUser([
'access content', 'administer site configuration', 'administer xmlsitemap', 'access administration pages', 'access site reports', 'administer permissions', 'view the administration theme',
]);
}
/**
......@@ -42,8 +44,11 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase {
/**
* Test base URL functionality.
*
* @codingStandardsIgnoreStart
*/
public function testBaseURL() {
// @codingStandardsIgnoreEnd
$this->drupalLogin($this->admin_user);
$edit = ['xmlsitemap_base_url' => ''];
$this->drupalPostForm('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
......@@ -66,7 +71,10 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase {
}
/**
* Test that configuration problems are reported properly in the status report.
* Test Status Report.
*
* Test that configuration problems are reported properly in the status
* report.
*/
public function testStatusReport() {
// Test the rebuild flag.
......
......@@ -22,7 +22,13 @@ class XmlSitemapListBuilderTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['administer languages', 'access administration pages', 'administer site configuration', 'administer xmlsitemap', 'access content']);
$this->admin_user = $this->drupalCreateUser([
'administer languages',
'access administration pages',
'administer site configuration',
'administer xmlsitemap',
'access content',
]);
$this->drupalLogin($this->admin_user);
$this->languageManager = \Drupal::languageManager();
......
......@@ -37,7 +37,11 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
xmlsitemap_link_bundle_enable('menu', $bundle_id);
}
$this->admin_user = $this->drupalCreateUser(['administer menu', 'administer xmlsitemap', 'access administration pages']);
$this->admin_user = $this->drupalCreateUser([
'administer menu',
'administer xmlsitemap',
'access administration pages',
]);
$this->normal_user = $this->drupalCreateUser(['access content']);
}
......@@ -48,6 +52,7 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
* menu links. Should we bring back this behavior in D8?
*/
public function testMenuSettings() {
// @codingStandardsIgnoreStart
// $this->drupalLogin($this->admin_user);
//
// $edit = array(
......@@ -74,6 +79,7 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase {
// 'weight[0][value]' => 0,
// );
// $this->drupalPostForm(NULL, $edit, 'Save');.
// @codingStandardsIgnoreEnd
}
/**
......
......@@ -23,7 +23,14 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
protected function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['administer nodes', 'administer languages', 'administer content types', 'access administration pages', 'create page content', 'edit own page content']);
$this->admin_user = $this->drupalCreateUser([
'administer nodes',
'administer languages',
'administer content types',
'access administration pages',
'create page content',
'edit own page content',
]);
$this->drupalLogin($this->admin_user);
xmlsitemap_link_bundle_enable('node', 'article');
......@@ -50,7 +57,9 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase {
$this->drupalLogin($this->admin_user);
$node = $this->drupalCreateNode([]);
$this->drupalPostForm('node/' . $node->id() . '/edit', ['langcode[0][value]' => 'en'], t('Save and keep published'));
$this->drupalPostForm('node/' . $node->id() . '/edit', [
'langcode[0][value]' => 'en',
], t('Save and keep published'));
$link = $this->assertSitemapLink('node', $node->id(), ['status' => 0, 'access' => 1]);
$this->assertIdentical($link['language'], 'en');
......
......@@ -46,7 +46,10 @@ class XmlSitemapMultilingualTest extends XmlSitemapMultilingualTestBase {
}
/**
* Test how links are included in a sitemap depending on the i18n_selection_mode config variable.
* Test Language Selection.
*
* Test how links are included in a sitemap depending on the
* i18n_selection_mode config variable.
*/
public function testLanguageSelection() {
$this->drupalLogin($this->admin_user);
......
......@@ -22,7 +22,13 @@ abstract class XmlSitemapMultilingualTestBase extends XmlSitemapTestBase {
// Call parent::setUp() allowing test cases to pass further modules.
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['administer languages', 'access administration pages', 'administer site configuration', 'administer xmlsitemap', 'access content']);
$this->admin_user = $this->drupalCreateUser([
'administer languages',
'access administration pages',
'administer site configuration',
'administer xmlsitemap',
'access content',
]);
$this->drupalLogin($this->admin_user);
if (!$this->languageManager->getLanguage('fr')) {
......
......@@ -34,8 +34,19 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['administer nodes', 'bypass node access', 'administer content types', 'administer xmlsitemap', 'administer taxonomy']);
$this->normal_user = $this->drupalCreateUser(['create page content', 'edit any page content', 'access content', 'view own unpublished content']);
$this->admin_user = $this->drupalCreateUser([
'administer nodes',
'bypass node access',
'administer content types',
'administer xmlsitemap',
'administer taxonomy',
]);
$this->normal_user = $this->drupalCreateUser([
'create page content',
'edit any page content',
'access content',
'view own unpublished content',
]);
// Allow anonymous user to view user profiles.
$user_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
......@@ -44,7 +55,11 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
xmlsitemap_link_bundle_enable('node', 'article');
xmlsitemap_link_bundle_enable('node', 'page');
xmlsitemap_link_bundle_settings_save('node', 'page', ['status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY]);
xmlsitemap_link_bundle_settings_save('node', 'page', [
'status' => 1,
'priority' => 0.6,
'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY,
]);
// Add a vocabulary so we can test different view modes.
$vocabulary = entity_create('taxonomy_vocabulary', [
......@@ -72,7 +87,6 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
'field_name' => $field_name,
'entity_type' => 'node',
'bundle' => 'page',
])->save();
entity_get_form_display('node', 'page', 'default')
......@@ -95,7 +109,7 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
}
/**
*
* Test Tags Field.
*/
public function testTagsField() {
$this->drupalLogin($this->admin_user);
......@@ -112,27 +126,46 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
$tags = entity_load_multiple('taxonomy_term');
foreach ($tags as $tag) {
$this->assertSitemapLinkValues('taxonomy_term', $tag->id(), ['status' => 0, 'priority' => 0.5, 'changefreq' => 0]);
$this->assertSitemapLinkValues('taxonomy_term', $tag->id(), [
'status' => 0,
'priority' => 0.5,
'changefreq' => 0,
]);
$tag->delete();
}
xmlsitemap_link_bundle_settings_save('taxonomy_term', 'tags', ['status' => 1, 'priority' => 0.2, 'changefreq' => XMLSITEMAP_FREQUENCY_HOURLY]);
xmlsitemap_link_bundle_settings_save('taxonomy_term', 'tags', [
'status' => 1,
'priority' => 0.2,
'changefreq' => XMLSITEMAP_FREQUENCY_HOURLY,
]);
$this->drupalPostForm('node/add/page', $edit, t('Save and publish'));
$tags = entity_load_multiple('taxonomy_term');
foreach ($tags as $tag) {
$this->assertSitemapLinkValues('taxonomy_term', $tag->id(), ['status' => 1, 'priority' => 0.2, 'changefreq' => XMLSITEMAP_FREQUENCY_HOURLY]);
$this->assertSitemapLinkValues('taxonomy_term', $tag->id(), [
'status' => 1,
'priority' => 0.2,
'changefreq' => XMLSITEMAP_FREQUENCY_HOURLY,
]);
$tag->delete();
}
}
/**
*
* Test Node Settings.
*/
public function testNodeSettings() {
$node = $this->drupalCreateNode(['publish' => 0, 'uid' => $this->normal_user->id()]);
$this->assertSitemapLinkValues('node', $node->id(), ['access' => 1, 'status' => 1, 'priority' => 0.6, 'status_override' => 0, 'priority_override' => 0, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY]);
$this->assertSitemapLinkValues('node', $node->id(), [
'access' => 1,
'status' => 1,
'priority' => 0.6,
'status_override' => 0,
'priority_override' => 0,
'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY,
]);
$this->drupalLogin($this->normal_user);
$this->drupalGet('node/' . $node->id() . '/edit');
......@@ -145,7 +178,14 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
];
$this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
$this->assertText('Basic page Test node title has been updated.');
$this->assertSitemapLinkValues('node', $node->id(), ['access' => 1, 'status' => 1, 'priority' => 0.6, 'status_override' => 0, 'priority_override' => 0, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY]);
$this->assertSitemapLinkValues('node', $node->id(), [
'access' => 1,
'status' => 1,
'priority' => 0.6,
'status_override' => 0,
'priority_override' => 0,
'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY,
]);
$this->drupalLogin($this->admin_user);
$this->drupalGet('node/' . $node->id() . '/edit');
......@@ -159,7 +199,14 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
];
$this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
$this->assertText('Basic page Test node title has been updated.');
$this->assertSitemapLinkValues('node', $node->id(), ['access' => 1, 'status' => 1, 'priority' => 0.9, 'status_override' => 1, 'priority_override' => 1, 'changefreq' => XMLSITEMAP_FREQUENCY_ALWAYS]);
$this->assertSitemapLinkValues('node', $node->id(), [
'access' => 1,
'status' => 1,
'priority' => 0.9,
'status_override' => 1,
'priority_override' => 1,
'changefreq' => XMLSITEMAP_FREQUENCY_ALWAYS,
]);
$edit = [
'xmlsitemap[status]' => 'default',
......@@ -167,7 +214,13 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
];
$this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
$this->assertText('Basic page Test node title has been updated.');
$this->assertSitemapLinkValues('node', $node->id(), ['access' => 1, 'status' => 1, 'priority' => 0.6, 'status_override' => 0, 'priority_override' => 0]);
$this->assertSitemapLinkValues('node', $node->id(), [
'access' => 1,
'status' => 1,
'priority' => 0.6,
'status_override' => 0,
'priority_override' => 0,
]);
}
/**
......@@ -177,7 +230,11 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase {
$this->drupalLogin($this->admin_user);
$node_old = $this->drupalCreateNode();
$this->assertSitemapLinkValues('node', $node_old->id(), ['status' => 1, 'priority' => 0.6, 'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY]);
$this->assertSitemapLinkValues('node', $node_old->id(), [
'status' => 1,
'priority' => 0.6,
'changefreq' => XMLSITEMAP_FREQUENCY_WEEKLY,
]);
$edit = [
'xmlsitemap[status]' => 0,
......
......@@ -23,7 +23,9 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase {
protected function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(['administer xmlsitemap', 'access administration pages', 'access site reports', 'administer users', 'administer permissions']);
$this->admin_user = $this->drupalCreateUser([
'administer xmlsitemap', 'access administration pages', 'access site reports', 'administer users', 'administer permissions',
]);
$this->drupalPlaceBlock('help_block', ['region' => 'help']);
......@@ -50,13 +52,22 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase {
* Test if user links are included in sitemap after rebuild.
*/
public function testUserLinksRebuild() {
xmlsitemap_link_bundle_settings_save('user', 'user', ['status' => 1, 'priority' => 0.4, 'changefreq' => XMLSITEMAP_FREQUENCY_MONTHLY]);
xmlsitemap_link_bundle_settings_save('user', 'user', [
'status' => 1,
'priority' => 0.4,
'changefreq' => XMLSITEMAP_FREQUENCY_MONTHLY,
]);
$dummy_user = $this->drupalCreateUser([]);
$this->drupalLogin($this->admin_user);
$this->drupalPostForm('admin/config/search/xmlsitemap/rebuild', [], t('Save configuration'));
$this->assertText('The sitemap links were rebuilt.');
$this->assertSitemapLinkValues('user', $dummy_user->id(), ['status' => 1, 'priority' => 0.4, 'changefreq' => XMLSITEMAP_FREQUENCY_MONTHLY, 'access' => 1]);
$this->assertSitemapLinkValues('user', $dummy_user->id(), [
'status' => 1,
'priority' => 0.4,
'changefreq' => XMLSITEMAP_FREQUENCY_MONTHLY,
'access' => 1,
]);
$this->drupalGet('sitemap.xml');
$this->assertRaw("user/{$dummy_user->id()}");
}
......
......@@ -23,6 +23,8 @@ abstract class XmlSitemapTestBase extends WebTestBase {
* The admin user account.
*
* @var \Drupal\Core\Session\AccountInterface
*
* @codingStandardsIgnoreStart
*/
protected $admin_user;
......@@ -32,6 +34,7 @@ abstract class XmlSitemapTestBase extends WebTestBase {
* @var \Drupal\Core\Session\AccountInterface
*/
protected $normal_user;
// @codingStandardsIgnoreEnd
/**
* The state store.
......@@ -90,7 +93,7 @@ abstract class XmlSitemapTestBase extends WebTestBase {
'type' => 'page',
'name' => 'Basic page',
'settings' => [
// Set proper default options for the page content type.
// Set proper default options for the page content type.
'node' => [
'options' => ['promote' => FALSE],
'submitted' => FALSE,
......@@ -113,13 +116,15 @@ abstract class XmlSitemapTestBase extends WebTestBase {
/**
* Assert the page does not respond with the specified response code.
*
* @param $code
* @param string $code
* Response code. For example 200 is a successful page request. For a list
* of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
* @param $message
* @param string $message
* Message to display.
* @param string $group
* Name of the group.
*
* @return
* @return mixed
* Assertion result.
*/
protected function assertNoResponse($code, $message = '', $group = 'Browser') {
......@@ -142,16 +147,16 @@ abstract class XmlSitemapTestBase extends WebTestBase {
/**
* Retrieves an XML sitemap.
*
* @param $context
* @param array $context
* An optional array of the XML sitemap's context.
* @param $options
* Options to be forwarded to Url::f