1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 19:54:04 +00:00

Bootstrap features manually in tests

This commit is contained in:
lukinovec 2023-02-23 16:22:52 +01:00
parent 3e6dd646ae
commit 91f8adb698
3 changed files with 23 additions and 17 deletions

View file

@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Route;
use Stancl\Tenancy\Events\TenancyEnded;
use Stancl\Tenancy\Jobs\CreateDatabase;
use Stancl\Tenancy\Events\TenantCreated;
use Stancl\Tenancy\TenancyServiceProvider;
use Stancl\Tenancy\Events\TenancyInitialized;
use Stancl\Tenancy\Features\UserImpersonation;
use Stancl\Tenancy\Listeners\BootstrapTenancy;
@ -41,6 +42,8 @@ beforeEach(function () {
],
]);
TenancyServiceProvider::bootstrapFeatures();
Event::listen(
TenantCreated::class,
JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {