diff --git a/core/modules/file/tests/src/Functional/DownloadTest.php b/core/modules/file/tests/src/Functional/DownloadTest.php index f563daeb62..113af2071d 100644 --- a/core/modules/file/tests/src/Functional/DownloadTest.php +++ b/core/modules/file/tests/src/Functional/DownloadTest.php @@ -73,7 +73,7 @@ protected function doPrivateFileTransferTest() { $this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.'); // Test that the file transferred correctly. - $this->assertSession()->responseContains($contents); + $this->assertSame($contents, $this->getSession()->getPage()->getContent(), 'Contents of the file are correct.'); // Deny access to all downloads via a -1 header. file_test_set_return('download', -1); diff --git a/core/modules/file/tests/src/Functional/FilePrivateTest.php b/core/modules/file/tests/src/Functional/FilePrivateTest.php index 3323029131..6ab315780a 100644 --- a/core/modules/file/tests/src/Functional/FilePrivateTest.php +++ b/core/modules/file/tests/src/Functional/FilePrivateTest.php @@ -15,7 +15,6 @@ */ class FilePrivateTest extends FileFieldTestBase { - /** * Modules to enable. * diff --git a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php index 91d2a92199..88fc5eb458 100644 --- a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php +++ b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php @@ -359,7 +359,7 @@ public function testDrupalMovingUploadedFileError() { ]; \Drupal::state()->set('file_test.disable_error_collection', TRUE); - $this->drupalPostFormWithInvalidOptions('file-test/save_upload_from_form_test', $edit, t('Submit')); + $this->drupalPostForm('file-test/save_upload_from_form_test', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertRaw(t('File upload error. Could not move uploaded file.'), 'Found the failure message.'); $this->assertRaw(t('Epic upload FAIL!'), 'Found the failure message.'); @@ -441,7 +441,7 @@ public function testCombinedErrorMessages() { 'extensions' => 'jpeg', ]; - $this->drupalPostFormWithInvalidOptions('file-test/save_upload_from_form_test', $edit, t('Submit')); + $this->drupalPostForm('file-test/save_upload_from_form_test', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertRaw(t('Epic upload FAIL!'), 'Found the failure message.');