assertSame([], BillingCycleCatalog::customMonths()); BillingCycleCatalog::saveCustomMonths([60, 12, 60, 0, 9999]); $this->assertSame([60], BillingCycleCatalog::customMonths()); $this->assertContains('months_60', BillingCycleCatalog::codes()); $this->assertSame(60, OrderHelper::cycleToMonths('months_60')); $this->assertSame('5 năm', BillingCycleCatalog::labelForCode('months_60')); $this->assertContains('months_60', ProductBillingCycles::forType('vps')); $this->assertSame(['annually'], ProductBillingCycles::forType('domain')); } public function test_unknown_code_is_rejected(): void { $this->expectException(\InvalidArgumentException::class); OrderHelper::cycleToMonths('months_x'); } }