diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php index 98810db95..ba4e7b27b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php @@ -28,7 +28,7 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase { public function testTomorrowInvalid() { - $bornAfter = new DateTime('+2 days'); + $bornAfter = new DateTime('2023-08-31'); $this->validator->validate($bornAfter, $this->createConstraint()); $this->buildViolation('msg') ->setParameter('%date%', (new DateTime('2023-08-29'))->format('d-m-Y')) @@ -38,7 +38,7 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase public function testValidateTodayInvalid() { - $bornToday = new DateTime('now'); + $bornToday = new DateTime('2023-08-30'); $this->validator->validate($bornToday, $this->createConstraint()); $this->buildViolation('msg') ->setParameter('%date%', (new DateTime('2023-08-29'))->format('d-m-Y')) @@ -59,7 +59,7 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase public function testValidateYesterdayValid() { - $bornYesterday = new DateTime('yesterday'); + $bornYesterday = new DateTime('2023-08-29'); $this->validator->validate($bornYesterday, $this->createConstraint()); $this->assertNoViolation(); }