diff --git a/core/modules/file/tests/src/Kernel/FileUrlTest.php b/core/modules/file/tests/src/Kernel/FileUrlTest.php index 832b3db83c..573fe25444 100644 --- a/core/modules/file/tests/src/Kernel/FileUrlTest.php +++ b/core/modules/file/tests/src/Kernel/FileUrlTest.php @@ -2,8 +2,6 @@ namespace Drupal\Tests\file\Kernel; -use Drupal\Core\Site\Settings; - /** * Tests the file url. * @@ -16,7 +14,7 @@ class FileUrlTest extends FileManagedUnitTestBase { */ public function testFilesUrlWithDifferentHostName() { $test_base_url = 'http://www.example.com/cdn'; - $this->settingsSet('file_public_base_url', $test_base_url); + $this->setSetting('file_public_base_url', $test_base_url); $filepath = file_create_filename('test.txt', ''); $directory_uri = 'public://' . dirname($filepath); file_prepare_directory($directory_uri, FILE_CREATE_DIRECTORY); @@ -26,20 +24,4 @@ public function testFilesUrlWithDifferentHostName() { $this->assertSame($url, $expected_url); } - /** - * Changes in memory settings. - * - * @param string $name - * The name of the setting to return. - * @param string $value - * The value of the setting. - * - * @see \Drupal\Core\Site\Settings::get() - */ - protected function settingsSet($name, $value) { - $settings = Settings::getAll(); - $settings[$name] = $value; - new Settings($settings); - } - }