# Test Documentation

## File Storage Service (Tests\Unit\Storage\FileStorageService)

- Resolve key with sub folder
- Resolve key without sub folder
- Upload module file stores policy pdf
- Read write and delete by module
- Get local path for processing points to writable file
- Cleanup temp path removes s 3 style temp file only
- Copy between keys
- Download returns attachment response
- Get temporary url for local uses base url

## Local Storage Driver (Tests\Unit\Storage\LocalStorageDriver)

- Upload from uploaded file stores under local root
- Upload from local path copies file
- Put write raw contents
- Exists returns false for missing file
- Delete removes file
- Download to temp returns existing local path
- Copy duplicates file
- Temporary url uses base url for local driver
- Stream download returns response with body

## Policy Storage Helper (Tests\Unit\Storage\PolicyStorageHelper)

- Policy file type map contains expected types
- Policy md file name converts pdf to md
- Policy upload pdf stores file
- Policy upload receipt stores file
- Policy upload returns null when no file
- Policy exists by type returns false for invalid type
- Policy download by type attachment
- Policy download by type inline
- Policy download by type throws for invalid type
- Policy local pdf path resolves stored pdf
- Policy markdown put read and exists