diff core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.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/LanguageUILanguageNegotiationTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/language/tests/src/Functional/LanguageUILanguageNegotiationTest.php	Thu May 09 15:34:47 2019 +0100
@@ -83,7 +83,7 @@
     $http_header_blah = ["Accept-Language" => "blah;q=1"];
 
     // Create a private file for testing accessible by the admin user.
-    drupal_mkdir($this->privateFilesDirectory . '/test');
+    \Drupal::service('file_system')->mkdir($this->privateFilesDirectory . '/test');
     $filepath = 'private://test/private-file-test.txt';
     $contents = "file_put_contents() doesn't seem to appreciate empty strings so let's put in some data.";
     file_put_contents($filepath, $contents);
@@ -446,7 +446,7 @@
 
     // Check that the language switcher active link matches the given browser
     // language.
-    $args = [':id' => 'block-test-language-block', ':url' => \Drupal::url('<front>') . $langcode_browser_fallback];
+    $args = [':id' => 'block-test-language-block', ':url' => Url::fromRoute('<front>')->toString() . $langcode_browser_fallback];
     $fields = $this->xpath('//div[@id=:id]//a[@class="language-link is-active" and starts-with(@href, :url)]', $args);
     $this->assertSame($fields[0]->getText(), $languages[$langcode_browser_fallback]->getName(), 'The browser language is the URL active language');