mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:34:04 +00:00
18 lines
467 B
PHP
18 lines
467 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\Event;
|
|
use Stancl\Tenancy\Events\TenancyInitialized;
|
|
use Stancl\Tenancy\Listeners\CreateTenantConnection;
|
|
use \Stancl\Tenancy\Tests\Etc\Tenant;
|
|
|
|
test('manual tenancy initialization works', function () {
|
|
Event::listen(TenancyInitialized::class, CreateTenantConnection::class);
|
|
|
|
$tenant = Tenant::create();
|
|
|
|
tenancy()->initialize($tenant);
|
|
|
|
expect(tenancy()->initialized)->toBeTrue();
|
|
});
|