Skip to content

Instantly share code, notes, and snippets.

@adarmanto
adarmanto / App\Jobs\CreateTenantDatabase.php
Last active May 31, 2023 00:53
How to configure the unit tests for spatie/laravel-multitenancy package
<?php
namespace App\Jobs;
use App\Models\Tenant;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
stages:
- test
- build
- deploy
test:
stage: test
image: lorisleiva/laravel-docker:8.0
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: testing