test(booking): freeze slot-mode contract before service-mode work
Adds SlotModeFrozenTest (#[Group('slot-mode-frozen')]) locking three things
against the multi-resource booking phase:
- GET /api/v1/appointment-slots response shape
- GET /api/v1/appointment-settings/month-availability/{uuid} response shape
- public method signatures of SlotCalculatorService
Fixtures are structural, not raw snapshots: a fixed past date is rejected by
isWithinBookingWindow so an empty snapshot would prove nothing. Instead a
deterministic schedule on a computed near-future date, with epoch/uuid values
normalized to placeholders. What stays locked is the contract itself: keys,
ordering, types and local times.
No production code touched.
Task: docs/new_feture/taskes/task-00-service-mode-completion/
Slot-mode contract: unchanged (--group=slot-mode-frozen green, 3 tests)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* READ-ONLY — امضای منجمد متدهای عمومی SlotCalculatorService.
|
||||
*
|
||||
* افزودن پارامتر **اختیاری** جدید مجاز است و باید یک بار همینجا ثبت شود؛ تغییر نام،
|
||||
* تغییر نوع، تغییر ترتیب یا حذف پارامتر موجود ممنوع است.
|
||||
* رجوع: docs/new_feture/taskes/_shared/red-lines.md
|
||||
*/
|
||||
return [
|
||||
'explainEmptyDay' => [
|
||||
'returns' => '?string',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'date' => 'string',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'findNextAvailableStart' => [
|
||||
'returns' => '?int',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'daysAhead' => 'int = 30',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'getAllSlotsWithAvailability' => [
|
||||
'returns' => 'array',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'date' => 'string',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'getAvailableSlots' => [
|
||||
'returns' => 'array',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'date' => 'string',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'getServiceStartTimes' => [
|
||||
'returns' => 'array',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'date' => 'string',
|
||||
'durationMinutes' => 'int',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'hasAnyAvailability' => [
|
||||
'returns' => 'bool',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'date' => 'string',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
'resolveSlotLocationId' => [
|
||||
'returns' => '?int',
|
||||
'params' => [
|
||||
'doctor' => 'App\Doctor\Entity\Doctor',
|
||||
'slotStart' => 'int',
|
||||
'clinic' => '?App\Clinic\Entity\Clinic = NULL',
|
||||
'forManagement' => 'bool = false',
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user