This is my package laravel-minio-testing-tools

1.0.1 2022-05-17 21:38 UTC

This package is auto-updated.

Last update: 2022-06-17 21:48:23 UTC


Latest Version on Packagist Software License GitHub Tests Action Status Total Downloads Buy us a tree

This package provides a trait to run your tests against a MinIO S3 server.

📝 Blog post:


We proudly support the community by developing Laravel packages and giving them away for free. Keeping track of issues and pull requests takes time, but we're happy to help! If this package saves you time or if you're relying on it professionally, please consider supporting the maintenance and development.


  • Starts and configures a MinIO server for your tests.
  • Updates the filesystems disk configuration.
  • Updates and restores the .env file.
  • Works with Laravel Dusk.
  • Works on GitHub Actions
  • Compatible with Laravel 9.0.
  • PHP 8.0 or higher is required.


Make sure you've downloaded the MinIO Server and Client for your OS.

You can install the package via composer:

composer require protonemedia/laravel-minio-testing-tools --dev

Add the trait to your test, and add the bootUsesMinIOServer method:


namespace Tests\Browser;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use ProtoneMedia\LaravelMinioTestingTools\UsesMinIOServer;
use Tests\DuskTestCase;

class UploadVideoTest extends DuskTestCase
    use DatabaseMigrations;
    use UsesMinIOServer;

    protected function setUp(): void


    /** @test */
    public function it_can_upload_a_video_using_multipart_upload()

That's it!

GitHub Actions

The easiest way is to download the MinIO Server and Client before the tests are run:

      - uses: actions/checkout@v2

      - name: Download MinIO S3 server and client
        run: |
          wget -q -P /usr/local/bin/
          wget -q -P /usr/local/bin/
          chmod +x /usr/local/bin/minio
          chmod +x /usr/local/bin/mc
          minio --version
          mc --version

If you're using php artisan serve, make sure you don't use the --no-reload flag, as the .env file will be changed on-the-fly.

Optionally, if you want persistent storage across the test suite, you may start the server manually before the tests are run.

      - uses: actions/checkout@v2

      - name: Download MinIO S3 server and client
        run: |
          wget -q -P /usr/local/bin/
          wget -q -P /usr/local/bin/
          chmod +x /usr/local/bin/minio
          chmod +x /usr/local/bin/mc
          minio --version
          mc --version

      - name: Run MinIO S3 server
        run: |
          mkdir ~/s3
          sudo minio server ~/s3 --json > minio-log.json &

      - name: Configure MinIO S3
        run: |
          mc config host add local minioadmin minioadmin
          mc admin user add local user password
          mc admin policy set local readwrite user=user
          mc mb local/bucket-name --region=eu-west-1

      - name: Upload Minio Logs (optional)
        if: failure()
        uses: actions/upload-artifact@v2
          name: minio
          path: minio-log.json

In this case, you also need to supply an environment file with the MinIO configuration. This makes the configuration also accessible by the browser session when you're running Laravel Dusk.



composer test


Please see CHANGELOG for more information on what has changed recently.


Please see CONTRIBUTING for details.

Other Laravel packages

  • Laravel Analytics Event Tracking: Laravel package to easily send events to Google Analytics.
  • Laravel Blade On Demand: Laravel package to compile Blade templates in memory.
  • Laravel Cross Eloquent Search: Laravel package to search through multiple Eloquent models.
  • Laravel Eloquent Scope as Select: Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.
  • Laravel Eloquent Where Not: This Laravel package allows you to flip/invert an Eloquent scope, or really any query constraint.
  • Laravel FFMpeg: This package provides an integration with FFmpeg for Laravel. The storage of the files is handled by Laravel's Filesystem.
  • Laravel Form Components: Blade components to rapidly build forms with Tailwind CSS Custom Forms and Bootstrap 4. Supports validation, model binding, default values, translations, includes default vendor styling and fully customizable!
  • Laravel Mixins: A collection of Laravel goodies.
  • Laravel Paddle: API integration for Laravel with support for webhooks/events.
  • Laravel Verify New Email: This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.
  • Laravel WebDAV: WebDAV driver for Laravel's Filesystem.


If you discover any security-related issues, please email instead of using the issue tracker. Please do not email any questions, open an issue if you have a question.



The MIT License (MIT). Please see License File for more information.