Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgauge/laravel-s3-minio
Fake S3 storage for running test code
https://github.com/cgauge/laravel-s3-minio
Last synced: about 2 months ago
JSON representation
Fake S3 storage for running test code
- Host: GitHub
- URL: https://github.com/cgauge/laravel-s3-minio
- Owner: cgauge
- Created: 2020-10-16T20:54:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-24T21:06:38.000Z (over 1 year ago)
- Last Synced: 2024-09-27T15:05:16.383Z (3 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Laravel S3 Minio 📁
This library provides a convenient way to write test code that runs
against Minio, an S3 compatible storage.# Installation
```bash
composer require customergauge/minio
```# Usage
```php
$minio = new Minio();$minio->disk('my-bucket', function (S3Client $client, string $bucket) {
$this->post('/my/endpoint/that/interacts/with/s3', [])
->assertSuccessful();$object = $client->getObject([
'Bucket' => $bucket,
'Key' => "/my/expected/s3/key"
]);$content = $object['Body']->getContents();
$this->assertStringContainsString('partial-file-content', $content);
});
```# Docker Example
```yaml
minio:
image: minio/minio
ports:
- 9000:9000
environment:
- MINIO_ACCESS_KEY=customergauge
- MINIO_SECRET_KEY=phpunit123
command: server /data
```