diff --git a/core/modules/file/tests/src/Functional/DownloadTest.php b/core/modules/file/tests/src/Functional/DownloadTest.php index 704c9db190..4c8c95ccea 100644 --- a/core/modules/file/tests/src/Functional/DownloadTest.php +++ b/core/modules/file/tests/src/Functional/DownloadTest.php @@ -2,9 +2,6 @@ namespace Drupal\Tests\file\Functional; -use Drupal\Core\Site\Settings; -use GuzzleHttp\Exception\RequestException; - /** * Tests for download/file transfer functions. * @@ -31,6 +28,7 @@ public function testPublicFileTransfer() { $http_client = \Drupal::httpClient(); $response = $http_client->head($url); $this->assertEquals(200, $response->getStatusCode(), 'Confirmed that the generated URL is correct by downloading the created file.'); + // Test generating a URL to a shipped file (i.e. a file that is part of // Drupal core, a module or a theme, for example a JavaScript file). $filepath = 'core/assets/vendor/jquery/jquery.min.js'; diff --git a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php index 6333a3e4c9..e60401b47f 100644 --- a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php @@ -98,7 +98,7 @@ public function testNodeDisplay() { // Add a second file. $name = 'files[' . $field_name . '_1][]'; $edit_upload[$name] = \Drupal::service('file_system')->realpath($test_file->getFileUri()); - $this->drupalPostForm('node/' . $nid . '/edit', $edit_upload, t('Upload')); + $this->drupalPostForm("node/$nid/edit", $edit_upload, t('Upload')); // Uncheck the display checkboxes and go to the preview. $edit[$field_name . '[0][display]'] = FALSE; diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php index 1cd5072bac..80887da17a 100644 --- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php +++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php @@ -161,7 +161,6 @@ public function uploadNodeFiles(array $files, $field_name, $nid_or_type, $new_re $edit[$name][] = $file_path; } } - $this->drupalPostForm("node/$nid/edit", $edit, t('Save')); return $nid;