docs(rtt) : clarify Pentecost-Monday invariant and 28h test coincidence
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -254,7 +254,8 @@ final readonly class RttRecoveryComputationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$contractAtSolidarity = $employeeContractsByDate[$solidarityDate] ?? null;
|
$contractAtSolidarity = $employeeContractsByDate[$solidarityDate] ?? null;
|
||||||
$solidarityIsoDay = (int) new DateTimeImmutable($solidarityDate)->format('N');
|
// Le Lundi de Pentecôte est toujours un lundi (ISO 1), mais on le dérive pour rester explicite.
|
||||||
|
$solidarityIsoDay = (int) new DateTimeImmutable($solidarityDate)->format('N');
|
||||||
// Attendu RÉEL du jour (planning workDaysHours), pas la répartition uniforme :
|
// Attendu RÉEL du jour (planning workDaysHours), pas la répartition uniforme :
|
||||||
// c'est ce qui rend la neutralisation correcte (cf. spec).
|
// c'est ce qui rend la neutralisation correcte (cf. spec).
|
||||||
$solidarityExpected = $this->dailyReferenceResolver->resolve(
|
$solidarityExpected = $this->dailyReferenceResolver->resolve(
|
||||||
|
|||||||
@@ -209,6 +209,8 @@ final class RttRecoveryComputationServiceTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* CUSTOM 28h : prorata = round(28×12) = 336 (5h36). worked 0, expected 336 → delta 0.
|
* CUSTOM 28h : prorata = round(28×12) = 336 (5h36). worked 0, expected 336 → delta 0.
|
||||||
|
* Le delta est nul ici par coïncidence du fallback uniforme (expected = prorata) ; avec un vrai
|
||||||
|
* workDaysHours où la valeur du lundi diffère, expected ≠ prorata et le delta serait non nul.
|
||||||
*/
|
*/
|
||||||
public function testSolidarityAdjustmentCustom28hUsesProrata(): void
|
public function testSolidarityAdjustmentCustom28hUsesProrata(): void
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user