function FileUploadTest::testInvalidFileUploads

Same name in other branches
  1. 10 core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::testInvalidFileUploads()

Tests invalid file uploads.

File

core/modules/jsonapi/tests/src/Functional/FileUploadTest.php, line 490

Class

FileUploadTest
Tests binary data file upload route.

Namespace

Drupal\Tests\jsonapi\Functional

Code

public function testInvalidFileUploads() : void {
    \Drupal::service('router.builder')->rebuild();
    $this->setUpAuthorization('POST');
    $this->config('jsonapi.settings')
        ->set('read_only', FALSE)
        ->save(TRUE);
    $this->testFileUploadInvalidFileType();
    $this->testPostFileUploadInvalidHeaders();
    $this->testFileUploadLargerFileSize();
    $this->testFileUploadMaliciousExtension();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.