Update to Drupal 8.0.5. For more information, see https://www.drupal.org/node/2679347
This commit is contained in:
parent
2a9f1f148d
commit
fd3b12cf27
251 changed files with 5439 additions and 957 deletions
|
@ -283,7 +283,7 @@ class ManagedFile extends FormElement {
|
|||
}
|
||||
|
||||
// Add the upload progress callback.
|
||||
$element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress');
|
||||
$element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress', ['key' => $upload_progress_key]);
|
||||
}
|
||||
|
||||
// The file upload field itself.
|
||||
|
|
|
@ -23,7 +23,7 @@ class DownloadTest extends FileManagedTestBase {
|
|||
* Test the public file transfer system.
|
||||
*/
|
||||
function testPublicFileTransfer() {
|
||||
// Test generating an URL to a created file.
|
||||
// Test generating a URL to a created file.
|
||||
$file = $this->createFile();
|
||||
$url = file_create_url($file->getFileUri());
|
||||
// URLs can't contain characters outside the ASCII set so $filename has to be
|
||||
|
@ -33,7 +33,7 @@ class DownloadTest extends FileManagedTestBase {
|
|||
$this->drupalHead($url);
|
||||
$this->assertResponse(200, 'Confirmed that the generated URL is correct by downloading the created file.');
|
||||
|
||||
// Test generating an URL to a shipped file (i.e. a file that is part of
|
||||
// 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';
|
||||
$url = file_create_url($filepath);
|
||||
|
|
|
@ -480,6 +480,12 @@ class FileFieldWidgetTest extends FileFieldTestBase {
|
|||
|
||||
// If the field has at least a item, the table should be visible.
|
||||
$this->assertIdentical(count($elements), 1);
|
||||
|
||||
// Test for AJAX error when using progress bar on file field widget
|
||||
$key = $this->randomMachineName();
|
||||
$this->drupalPost('file/progress/' . $key, 'application/json', []);
|
||||
$this->assertNoResponse(500, t('No AJAX error when using progress bar on file field widget'));
|
||||
$this->assertText('Starting upload...');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue