diff --git a/core/modules/file/src/Tests/FileManagedFileElementTest.php b/core/modules/file/src/Tests/FileManagedFileElementTest.php index 9074166..9953217 100644 --- a/core/modules/file/src/Tests/FileManagedFileElementTest.php +++ b/core/modules/file/src/Tests/FileManagedFileElementTest.php @@ -41,10 +41,10 @@ function testManagedFile() { // was not saved. $last_fid_prior = $this->getLastFileId(); $edit = [ - 'files[' . $input_base_name . ']' => drupal_realpath($test_file->getFileUri()), + $file_field_name => drupal_realpath($test_file->getFileUri()), 'form_token' => 'invalid token', ]; - $this->drupalPost($path, $edit, t('Save')); + $this->drupalPostForm($path, $edit, t('Save')); $this->assertText('The form has become outdated. Copy any unsaved work in the form below'); $last_fid = $this->getLastFileId(); $this->assertEqual($last_fid_prior, $last_fid, 'File was not saved when uploaded with an invalid form token.');