feat: add SeedDemoDataCommand for seeding production-like demo data for testing representations, doctors, clinics, users, appointments, and commissions

This commit is contained in:
hamed
2026-07-09 08:07:41 +03:30
parent 0750bc9812
commit 0ad8487aac
16 changed files with 3454 additions and 1155 deletions
@@ -78,6 +78,18 @@ class DomainCommissionTest extends ApiTestCase
$this->assertNull($ctx->city);
}
public function testResolverMatchesByFirstLabelForLocalDev(): void
{
$prefix = 'repdev' . substr(uniqid(), -6);
$rep = $this->makeRep($prefix . '.ir', global: true);
// host لوکال با TLD متفاوت (`.localhost`) باید همان نماینده را بیابد.
$ctx = $this->resolver()->resolve($prefix . '.localhost');
$this->assertSame($rep->getId(), $ctx->representationId());
$this->assertTrue($ctx->isGlobalRepresentation);
}
// ── CommissionService: گارد دوشرطی ───────────────────────────────────────
public function testAppointmentCommissionOnlyWhenDomainOwnerMatchesDoctorOwner(): void