Commit 69cb2426 authored by amateescu's avatar amateescu
Browse files

Issue #2783387 followup: Added a test for multilingual frontpage links.

parent de2c0295
......@@ -3,6 +3,7 @@
namespace Drupal\xmlsitemap\Tests;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Url;
* Tests the generation of multilingual sitemaps.
......@@ -28,6 +29,22 @@ class XmlSitemapMultilingualTest extends XmlSitemapMultilingualTestBase {
$this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
* Tests the frontpage link for multiple languages.
public function testFrontpageLink() {
// Check that the frontpage link is correct for default and non-default
// languages.
$frontpage_link = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString();
$this->assertRaw($frontpage_link, "English frontpage link found in the sitemap.");
$this->assertRaw($frontpage_link . '/fr', "French frontpage link found in the sitemap.");
* Test how links are included in a sitemap depending on the i18n_selection_mode config variable.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment