'path/to/file', 'originalName' => 'file.pdf', 'mimeType' => 'application/pdf', ], $overrides); return new AttachedFile(...$data); } it('can instantiate', function () { // GIVEN $path = 'path/to/file'; $originalName = 'file.pdf'; $mimeType = 'application/pdf'; // WHEN $vo = new AttachedFile( path: $path, originalName: $originalName, mimeType: $mimeType ); // THEN expect($vo)->toBeInstanceOf(AttachedFile::class); }); it('throws exception if path is empty', function () { // GIVEN $path = ' '; // WHEN $action = fn () => getNewAttachedFile(['path' => $path]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if original name is empty', function () { // GIVEN $originalName = ' '; // WHEN $action = fn () => getNewAttachedFile(['originalName' => $originalName]); // THEN expect($action)->toThrow(\DomainException::class); }); it('throws exception if mime type is empty', function () { // GIVEN $mimeType = ' '; // WHEN $action = fn () => getNewAttachedFile(['mimeType' => $mimeType]); // THEN expect($action)->toThrow(\DomainException::class); }); });