What Changed Removed per-file uses(TestCase::class ...) bindings in Unit tests to avoid Pest v4 “folder already uses the test case” discovery failure (kept RefreshDatabase where needed). Updated the backup scheduling job test to pass the newly required BulkOperationService when manually calling RunBackupScheduleJob::handle(). Where Unit (bulk cleanup across 56 files) RunBackupScheduleJobTest.php Verification ./vendor/bin/sail test → 443 passed, 5 skipped Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #45
18 lines
490 B
PHP
18 lines
490 B
PHP
<?php
|
|
|
|
use App\Models\Tenant;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
it('finds tenant by guid without casting to bigint', function () {
|
|
$tenant = Tenant::create([
|
|
'tenant_id' => 'b0091e5d-944f-4a34-bcd9-12cbfb7b75cf',
|
|
'name' => 'Test Tenant',
|
|
]);
|
|
|
|
$found = Tenant::query()->forTenant('b0091e5d-944f-4a34-bcd9-12cbfb7b75cf')->first();
|
|
|
|
expect($found)->not->toBeNull();
|
|
expect($found->id)->toBe($tenant->id);
|
|
});
|