Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add liechtenstein test
Browse files Browse the repository at this point in the history
Martin-Welte committed Jan 17, 2024
1 parent 51b800e commit 2c4ad1c
Showing 2 changed files with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[
{
"name": "Neujahr",
"date": "2024-01-01"
},
{
"name": "Heilige Drei K\u00f6nige",
"date": "2024-01-06"
},
{
"name": "Ostermontag",
"date": "2024-04-01"
},
{
"name": "Tag der Arbeit",
"date": "2024-05-01"
},
{
"name": "Auffahrt",
"date": "2024-05-09"
},
{
"name": "Pfingstmontag",
"date": "2024-05-20"
},
{
"name": "Fronleichnam",
"date": "2024-05-30"
},
{
"name": "Staatsfeiertag \/ Mari\u00e4 Himmelfahrt",
"date": "2024-08-15"
},
{
"name": "Mari\u00e4 Geburt",
"date": "2024-09-08"
},
{
"name": "Allerheiligen",
"date": "2024-11-01"
},
{
"name": "Mari\u00e4 Empf\u00e4ngnis",
"date": "2024-12-08"
},
{
"name": "Weihnachten",
"date": "2024-12-25"
},
{
"name": "Stephanstag",
"date": "2024-12-26"
}
]
18 changes: 18 additions & 0 deletions tests/Countries/LiechtensteinTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Spatie\Holidays\Tests\Countries;

use Carbon\CarbonImmutable;
use Spatie\Holidays\Holidays;

it('can calculate liechtenstein holidays', function () {
CarbonImmutable::setTestNowAndTimezone('2024-01-01');

$holidays = Holidays::for(country: 'li')->get();

expect($holidays)
->toBeArray()
->not()->toBeEmpty();

expect(formatDates($holidays))->toMatchSnapshot();
});

0 comments on commit 2c4ad1c

Please sign in to comment.