Http::response('', 500) ]); } public function test_get_available_periods_returns_correct_options(): void { $service = new DashboardStatsService(); $periods = $service->getAvailablePeriods(); $this->assertIsArray($periods); $this->assertArrayHasKey('today', $periods); $this->assertArrayHasKey('week', $periods); $this->assertArrayHasKey('month', $periods); $this->assertArrayHasKey('year', $periods); $this->assertArrayHasKey('all', $periods); $this->assertEquals('Today', $periods['today']); $this->assertEquals('All Time', $periods['all']); } public function test_service_instantiation(): void { $service = new DashboardStatsService(); $this->assertInstanceOf(DashboardStatsService::class, $service); } }