Verified Commit 93602d91 authored by Dave Long's avatar Dave Long
Browse files

Issue #3416071 by catch: Consolidate one more jsonapi invalid file upload test method

(cherry picked from commit f4c7499b)
parent 67bb7069
Loading
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -521,6 +521,7 @@ public function testInvalidFileUploads() {
    \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();
@@ -570,11 +571,7 @@ public function testFileUploadZeroByteFile() {
  /**
   * Tests using the file upload route with an invalid file type.
   */
  public function testFileUploadInvalidFileType() {
    \Drupal::service('router.builder')->rebuild();
    $this->setUpAuthorization('POST');
    $this->config('jsonapi.settings')->set('read_only', FALSE)->save(TRUE);

  protected function testFileUploadInvalidFileType() {
    $uri = Url::fromUri('base:' . static::$postUri);

    // Test with a JSON file.