now()->subMinutes(10), 'ended_at' => now(), ]); $this->assertSame(1.0, $billing->streamingHoursFor($session)); } public function test_streaming_amount_minor_matches_hourly_rate(): void { config(['meet.billing.price_per_hour_ghs' => 0.30]); $billing = app(MeetBillingService::class); $this->assertSame(30, $billing->amountMinorForStreamingHours(1)); $this->assertSame(60, $billing->amountMinorForStreamingHours(2)); } public function test_storage_amount_minor_matches_gb_monthly_rate(): void { config(['meet.billing.price_per_gb_month_ghs' => 0.30]); $billing = app(MeetBillingService::class); $oneGb = 1073741824; $this->assertSame(30, $billing->amountMinorForStorageBytes($oneGb)); } }