Skip to content

Commit

Permalink
fix(germany): Pentecost is not an official holiday - except in Brande…
Browse files Browse the repository at this point in the history
…nburg (#337)

* fix(Provider\Germany): pentecost is not an official holiday - except in Brandenburg (see #100)
  • Loading branch information
fbett authored and stelgenhof committed Dec 23, 2024
1 parent 8abe19f commit 1c64419
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Germany.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function initialize(): void
$this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));
$this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));
$this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));
$this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));
$this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER));
$this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale));
$this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale));

Expand Down
5 changes: 4 additions & 1 deletion tests/Germany/GermanyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ public function testBankHolidays(): void
*/
public function testOtherHolidays(): void
{
$this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER);
$this->assertDefinedHolidays([
'newYearsEve',
'pentecost',
], self::REGION, $this->year, Holiday::TYPE_OTHER);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Germany/PentecostTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ public function testTranslation(): void
*/
public function testHolidayType(): void
{
$this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL);
$this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER);
}
}

0 comments on commit 1c64419

Please sign in to comment.