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

rewrite ViteBundlerTest to phpunit syntax

This commit is contained in:
Samuel Štancl 2022-09-28 16:43:20 +02:00
parent d093c1387d
commit ab2af5b388

View file

@ -3,18 +3,20 @@
declare(strict_types=1);
use Illuminate\Foundation\Vite as FoundationVite;
use Illuminate\Support\Facades\App;
use Stancl\Tenancy\Features\ViteBundler;
use Stancl\Tenancy\Tests\Etc\Tenant;
use Stancl\Tenancy\Tests\TestCase;
use Stancl\Tenancy\Vite as StanclVite;
test('replaces the vite helper instance with custom class', function () {
class ViteBundlerTest extends TestCase
{
/** @test */
public function the_vite_helper_uses_our_custom_class()
{
$vite = app(\Illuminate\Foundation\Vite::class);
expect($vite)->toBeInstanceOf(FoundationVite::class);
expect($vite)->not->toBeInstanceOf(StanclVite::class);
$this->assertInstanceOf(FoundationVite::class, $vite);
$this->assertNotInstanceOf(StanclVite::class, $vite);
config([
'tenancy.features' => [ViteBundler::class],
@ -28,5 +30,6 @@ test('replaces the vite helper instance with custom class', function () {
$vite = app(\Illuminate\Foundation\Vite::class);
expect($vite)->toBeInstanceOf(StanclVite::class);
});
$this->assertInstanceOf(StanclVite::class, $vite);
}
}