create(); $tenantB = Tenant::factory()->create(); $installation = DeploymentInstallation::create([ 'tenant_id' => $tenantA->id, 'name' => 'ISP A Server', 'deployment_type' => DeploymentMode::SelfHosted, 'instance_key_hash' => hash('sha256', 'instance-secret'), ]); License::create([ 'tenant_id' => $tenantA->id, 'deployment_installation_id' => $installation->id, 'license_key_hash' => hash('sha256', 'RNDM-RAW-KEY'), 'plan' => 'professional', 'status' => LicenseStatus::Active, 'starts_at' => now(), 'expires_at' => now()->addYear(), ]); app(TenantContext::class)->set($tenantB->id); $this->assertCount(0, License::all()); $this->assertCount(0, DeploymentInstallation::all()); } public function test_self_hosted_installation_cannot_create_platform_admin(): void { config()->set('deployment.mode', DeploymentMode::SelfHosted->value); $this->artisan('app:create-platform-admin') ->expectsOutput('Platform Super Admin hanya dibuat pada RADIQ control plane atau managed cloud.') ->assertFailed(); } }