public function testCreateFileIsWrittenInFs(): void
{ /** @var FilesystemOperator $fileSystem */
$fileSystem =
$this->
getContainer()->
get('shopware.filesystem.private'
);
$document =
$this->
createDocumentWithFile();
/** @var UrlGenerator $urlGenerator */
$urlGenerator =
$this->
getContainer()->
get(UrlGeneratorInterface::
class);
static::
assertNotNull($document->
getDocumentMediaFile());
$filePath =
$urlGenerator->
getRelativeMediaUrl($document->
getDocumentMediaFile());
static::
assertTrue($fileSystem->
has($filePath));
$fileSystem->
delete($filePath);
static::
assertFalse($fileSystem->
has($filePath));
} public function testReadDocumentFileWithInvalidDocumentId(): void
{ $documentId = Uuid::
randomHex();