Mercurial > hg > cmmr2012-drupal-site
diff core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php Thu May 09 15:34:47 2019 +0100 @@ -61,7 +61,7 @@ // Check that URL rewriting is not applied to subrequests. $this->drupalGet('language_test/subrequest'); - $this->assertText($this->webUser->getUsername(), 'Page correctly retrieved'); + $this->assertText($this->webUser->getAccountName(), 'Page correctly retrieved'); } /** @@ -81,7 +81,7 @@ private function checkUrl(LanguageInterface $language, $message1, $message2) { $options = ['language' => $language, 'script' => '']; $base_path = trim(base_path(), '/'); - $rewritten_path = trim(str_replace($base_path, '', \Drupal::url('<front>', [], $options)), '/'); + $rewritten_path = trim(str_replace($base_path, '', Url::fromRoute('<front>', [], $options)->toString()), '/'); $segments = explode('/', $rewritten_path, 2); $prefix = $segments[0]; $path = isset($segments[1]) ? $segments[1] : $prefix; @@ -125,7 +125,7 @@ // In case index.php is part of the URLs, we need to adapt the asserted // URLs as well. - $index_php = strpos(\Drupal::url('<front>', [], ['absolute' => TRUE]), 'index.php') !== FALSE; + $index_php = strpos(Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(), 'index.php') !== FALSE; $request = Request::createFromGlobals(); $server = $request->server->all();