From 1a96f1fad1b0d3dc97f41d240ac5d0a0b25cac38 Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Thu, 23 Nov 2023 00:31:58 +0100 Subject: [PATCH] =?UTF-8?q?correction=20des=20tests=20unitaires=20quand=20?= =?UTF-8?q?on=20les=20lan=C3=A7ait=20=C3=A0=20minuit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit En lançant les tests à minuit, ceux-ci plantaient : https://github.com/afup/web/actions/runs/6963642073/job/18949581204 Cela car on ne précisait pas l'heure dans un des tests, c'est donc chose faite. --- tests/units/Afup/Association/Cotisations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/units/Afup/Association/Cotisations.php b/tests/units/Afup/Association/Cotisations.php index 73598e8fb..92ea1bef2 100644 --- a/tests/units/Afup/Association/Cotisations.php +++ b/tests/units/Afup/Association/Cotisations.php @@ -27,8 +27,8 @@ protected function generateCotisationProvider() ], [ 'case' => 'La cotisation précédente expire dans 1 mois, la nouvelle cotisation doit expirer dans 13 mois', - 'date_fin' => (new \DateTime('+1 month')), - 'expected' => (new \DateTime('+1 month'))->add(new \DateInterval('P1Y')), + 'date_fin' => (new \DateTimeImmutable('+1 month'))->setTime(14, 0), + 'expected' => (new \DateTimeImmutable('+1 month'))->setTime(14, 0)->add(new \DateInterval('P1Y')), ], ]; }