1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:54:03 +00:00

Merge branch '3.x' into merge-3.x

This commit is contained in:
lukinovec 2023-02-20 09:07:06 +01:00
commit 790d7ff12a
12 changed files with 108 additions and 122 deletions

View file

@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
use Stancl\Tenancy\Features\ViteBundler;
use Stancl\Tenancy\Tests\Etc\Tenant;
use Stancl\Tenancy\Tests\TestCase;
use Stancl\Tenancy\Vite as StanclVite;
class ViteBundlerTest extends TestCase
{
/** @test */
public function the_vite_helper_uses_our_custom_class()
{
$vite = app(\Illuminate\Foundation\Vite::class);
$this->assertInstanceOf(\Illuminate\Foundation\Vite::class, $vite);
$this->assertNotInstanceOf(StanclVite::class, $vite);
config([
'tenancy.features' => [ViteBundler::class],
]);
$tenant = Tenant::create();
tenancy()->initialize($tenant);
app()->forgetInstance(\Illuminate\Foundation\Vite::class);
$vite = app(\Illuminate\Foundation\Vite::class);
$this->assertInstanceOf(StanclVite::class, $vite);
}
}