mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 15:54:03 +00:00
rewrite ViteBundlerTest to phpunit syntax
This commit is contained in:
parent
d093c1387d
commit
ab2af5b388
1 changed files with 19 additions and 16 deletions
|
|
@ -3,18 +3,20 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Illuminate\Foundation\Vite as FoundationVite;
|
use Illuminate\Foundation\Vite as FoundationVite;
|
||||||
use Illuminate\Support\Facades\App;
|
|
||||||
use Stancl\Tenancy\Features\ViteBundler;
|
use Stancl\Tenancy\Features\ViteBundler;
|
||||||
use Stancl\Tenancy\Tests\Etc\Tenant;
|
use Stancl\Tenancy\Tests\Etc\Tenant;
|
||||||
|
use Stancl\Tenancy\Tests\TestCase;
|
||||||
use Stancl\Tenancy\Vite as StanclVite;
|
use Stancl\Tenancy\Vite as StanclVite;
|
||||||
|
|
||||||
|
class ViteBundlerTest extends TestCase
|
||||||
test('replaces the vite helper instance with custom class', function () {
|
{
|
||||||
|
/** @test */
|
||||||
|
public function the_vite_helper_uses_our_custom_class()
|
||||||
|
{
|
||||||
$vite = app(\Illuminate\Foundation\Vite::class);
|
$vite = app(\Illuminate\Foundation\Vite::class);
|
||||||
|
|
||||||
expect($vite)->toBeInstanceOf(FoundationVite::class);
|
$this->assertInstanceOf(FoundationVite::class, $vite);
|
||||||
|
$this->assertNotInstanceOf(StanclVite::class, $vite);
|
||||||
expect($vite)->not->toBeInstanceOf(StanclVite::class);
|
|
||||||
|
|
||||||
config([
|
config([
|
||||||
'tenancy.features' => [ViteBundler::class],
|
'tenancy.features' => [ViteBundler::class],
|
||||||
|
|
@ -28,5 +30,6 @@ test('replaces the vite helper instance with custom class', function () {
|
||||||
|
|
||||||
$vite = app(\Illuminate\Foundation\Vite::class);
|
$vite = app(\Illuminate\Foundation\Vite::class);
|
||||||
|
|
||||||
expect($vite)->toBeInstanceOf(StanclVite::class);
|
$this->assertInstanceOf(StanclVite::class, $vite);
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue