You are here

public function UploadFileServiceTest::testMissingSettings in GraphQL 8.4

Tests that missing settings keys throw an exception.

File

tests/src/Kernel/Framework/UploadFileServiceTest.php, line 116

Class

UploadFileServiceTest
Tests file uploads that should be mapped to a field in a resolver.

Namespace

Drupal\Tests\graphql\Kernel\Framework

Code

public function testMissingSettings() : void {

  // Create a Symfony dummy uploaded file in test mode.
  $uploadFile = $this
    ->getUploadedFile(UPLOAD_ERR_OK);
  $this
    ->expectException(\RuntimeException::class);
  $this->uploadService
    ->saveFileUpload($uploadFile, []);
}