Skip to content

Commit

Permalink
test: fix issue with Portuguese Republic Day test
Browse files Browse the repository at this point in the history
The generator for the years on or after the establishment of the Portuguese
Republic Day did not honor the fact that this holiday was suspended in
2013, resulting in tests to fail for years between 2013 and 2016 (when
it was restored again).

Signed-off-by: Sacha Telgenhof <me@sachatelgenhof.com>
  • Loading branch information
stelgenhof committed Apr 10, 2024
1 parent 42a2779 commit d13723a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Portugal/PortugueseRepublicDayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private function randomYearsBeforeEstablishment(): \Generator
*/
private function randomYearsOnAfterEstablishment(): \Generator
{
yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR);
yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1);
yield self::ESTABLISHMENT_YEAR;
}

Expand Down

0 comments on commit d13723a

Please sign in to comment.