diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php index 85be4d1..d12ef6e 100644 --- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php @@ -412,13 +412,17 @@ function testUrlLanguageFallback() { // Check that the language switcher active link matches the given browser // language. - $args = array(':id' => 'block-test-language-block', ':url' => \Drupal::url('') . $langcode_browser_fallback); + $args = array( + ':id' => 'block-test-language-block', + ':url' => \Drupal::url('') . $langcode_browser_fallback, + ':absolute_url' => \Drupal::url('', [], ['absolute' => TRUE]) . $langcode_browser_fallback + ); $fields = $this->xpath('//div[@id=:id]//a[@class="language-link active" and starts-with(@href, :url)]', $args); $this->assertTrue($fields[0] == $languages[$langcode_browser_fallback]->getName(), 'The browser language is the URL active language'); // Check that URLs are rewritten using the given browser language. - $fields = $this->xpath('//div[@class="site-name"]/a[@rel="home" and @href=:url]', $args); - $this->assertTrue($fields[0] == 'Drupal', 'URLs are rewritten using the browser language.'); + $fields = $this->xpath('//div[@class="site-name"]/a[@rel="home" and @href=:absolute_url]', $args); + $this->assertTrue(!empty($fields), 'URLs are rewritten using the browser language.'); } /**