Skip to content

Commit

Permalink
test(portugal): fix official holidays tests
Browse files Browse the repository at this point in the history
The Restoration of Independence Day was considered to be observed at any
time, however it is only observed between 1850 and 2012, and since 2016.

Signed-off-by: Sacha Telgenhof <me@sachatelgenhof.com>
  • Loading branch information
stelgenhof committed Dec 23, 2024
1 parent a0b6307 commit 054359c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Portugal/PortugalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function testOfficialHolidays(): void
'immaculateConception',
'christmasDay',
'25thApril',
'restorationOfIndependence',
'portugalDay',
];

Expand All @@ -66,6 +65,10 @@ public function testOfficialHolidays(): void
$holidays[] = 'portugueseRepublic';
}

if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) {
$holidays[] = 'restorationOfIndependence';
}

$this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL);
}

Expand Down

0 comments on commit 054359c

Please sign in to comment.