Mercurial > hg > isophonics-drupal-site
diff core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php Thu May 09 15:33:08 2019 +0100 @@ -2,6 +2,7 @@ namespace Drupal\Tests\language\Functional; +use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; /** @@ -50,7 +51,7 @@ $this->assertRaw(t('The mapping for the %browser browser language code has been deleted.', $t_args), 'The test browser language code has been deleted.'); // Check we went back to the browser negotiation mapping overview. - $this->assertUrl(\Drupal::url('language.negotiation_browser', [], ['absolute' => TRUE])); + $this->assertUrl(Url::fromRoute('language.negotiation_browser', [], ['absolute' => TRUE])->toString()); // Check that ch-zn no longer exists. $this->assertNoField('edit-mappings-zh-cn-browser-langcode', 'Chinese browser language code no longer exists.'); @@ -60,7 +61,7 @@ 'new_mapping[drupal_langcode]' => 'en', ]; $this->drupalPostForm('admin/config/regional/language/detection/browser', $edit, t('Save configuration')); - $this->assertUrl(\Drupal::url('language.negotiation_browser', [], ['absolute' => TRUE])); + $this->assertUrl(Url::fromRoute('language.negotiation_browser', [], ['absolute' => TRUE])->toString()); $this->assertField('edit-mappings-xx-browser-langcode', 'xx', 'Browser language code found.'); $this->assertField('edit-mappings-xx-drupal-langcode', 'en', 'Drupal language code found.'); @@ -82,7 +83,7 @@ 'mappings[xx][drupal_langcode]' => 'zh-hans', ]; $this->drupalPostForm('admin/config/regional/language/detection/browser', $edit, t('Save configuration')); - $this->assertUrl(\Drupal::url('language.negotiation_browser', [], ['absolute' => TRUE])); + $this->assertUrl(Url::fromRoute('language.negotiation_browser', [], ['absolute' => TRUE])->toString()); $this->assertField('edit-mappings-xx-browser-langcode', 'xx', 'Browser language code found.'); $this->assertField('edit-mappings-xx-drupal-langcode', 'zh-hans', 'Drupal language code found.'); }