mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:34:03 +00:00
* Bump dependencies for Laravel 10 * Update GitHub Actions for Laravel 10 * ci: do not test L10 using PHP 7.3 * drop < L9 support * use `dispatch_sync` instead of `dispatch_now` * migrate phpunit configuration * Update ci.yml * drop laravel < 9 support * misc L10 fixes, new docker image * specify odbc version * wip * properly list php versions as strings * minor changes * Add `getValue($queryGrammar)` to raw query * Clean up `isVersion8` code * rewrite hasFailed assertion * phpunit schema update * Upgrade `doctrine/dbal` --------- Co-authored-by: Samuel Štancl <samuel@archte.ch> Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com> Co-authored-by: lukinovec <lukinovec@gmail.com>
34 lines
864 B
PHP
34 lines
864 B
PHP
<?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);
|
|
}
|
|
}
|