Skip to content

Commit

Permalink
test: fix test for the previous function
Browse files Browse the repository at this point in the history
The unit test for the `previous` function uses an example holiday that
has a lower limit. If the randomized year is exactly the same as the
lower limit, the test fails as there is no previous date.

Increased the lower limit to avoid this situation.

Signed-off-by: Sacha Telgenhof <[email protected]>
  • Loading branch information
stelgenhof committed Dec 13, 2024
1 parent f99f1bd commit 74a719e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Base/YasumiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function testPrevious(): void
{
$country = 'Netherlands';
$name = 'liberationDay';
$year_lower_limit = 1949;
$year_lower_limit = 1950;
$year = self::numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND);

$holidays = Yasumi::create($country, $year);
Expand Down

0 comments on commit 74a719e

Please sign in to comment.