MediaUploadController example

Uuid::randomHex()
        );

        $this->mediaService->expects(static::once())
            ->method('fetchFile')
            ->willReturn($uploadFile);

        $this->fileSaver->expects(static::once())
            ->method('persistFileToMedia')
            ->with($uploadFile, 'filename.png', $mediaId$context);

        $mediaUploadController = new MediaUploadController(
            $this->mediaService,
            $this->fileSaver,
            $this->fileNameProvider,
            new MediaDefinition(),
            new EventDispatcher()
        );

        $mediaUploadController->upload($request$mediaId$context$this->responseFactory);
    }

    public function testRemoveNonPrintingCharactersInFileNameBeforeRename(): void
    {
Home | Imprint | This part of the site doesn't use cookies.