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

Merge branch 'master' of github.com:archtechx/tenancy into unware-feature

This commit is contained in:
lukinovec 2023-02-23 15:12:59 +01:00
commit b0560331ed
87 changed files with 2308 additions and 533 deletions

View file

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
use Illuminate\Foundation\Vite;
use Stancl\Tenancy\Tests\Etc\Tenant;
use Stancl\Tenancy\Vite as StanclVite;
use Stancl\Tenancy\Features\ViteBundler;
test('vite helper uses our custom class', function() {
$vite = app(Vite::class);
expect($vite)->toBeInstanceOf(Vite::class);
expect($vite)->not()->toBeInstanceOf(StanclVite::class);
config([
'tenancy.features' => [ViteBundler::class],
]);
$tenant = Tenant::create();
tenancy()->initialize($tenant);
app()->forgetInstance(Vite::class);
$vite = app(Vite::class);
expect($vite)->toBeInstanceOf(StanclVite::class);
});