diff --git a/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_another_year.snap b/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2022.snap similarity index 100% rename from tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_another_year.snap rename to tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2022.snap diff --git a/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2023.snap b/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2023.snap new file mode 100644 index 000000000..423dc33e2 --- /dev/null +++ b/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2023.snap @@ -0,0 +1,42 @@ +[ + { + "name": "Nieuwjaar", + "date": "01-01-2023" + }, + { + "name": "Paasmaandag", + "date": "04-09-2023" + }, + { + "name": "Dag van de Arbeid", + "date": "05-01-2023" + }, + { + "name": "OH Hemelvaart", + "date": "05-17-2023" + }, + { + "name": "Pinkstermaandag", + "date": "05-28-2023" + }, + { + "name": "Nationale Feestdag", + "date": "07-21-2023" + }, + { + "name": "OLV Hemelvaart", + "date": "08-15-2023" + }, + { + "name": "Allerheiligen", + "date": "11-01-2023" + }, + { + "name": "Wapenstilstand", + "date": "11-11-2023" + }, + { + "name": "Kerstmis", + "date": "12-25-2023" + } +] \ No newline at end of file diff --git a/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2025.snap b/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2025.snap new file mode 100644 index 000000000..423dc33e2 --- /dev/null +++ b/tests/.pest/snapshots/HolidaysTest/it_can_get_all_holidays_of_2025.snap @@ -0,0 +1,42 @@ +[ + { + "name": "Nieuwjaar", + "date": "01-01-2023" + }, + { + "name": "Paasmaandag", + "date": "04-09-2023" + }, + { + "name": "Dag van de Arbeid", + "date": "05-01-2023" + }, + { + "name": "OH Hemelvaart", + "date": "05-17-2023" + }, + { + "name": "Pinkstermaandag", + "date": "05-28-2023" + }, + { + "name": "Nationale Feestdag", + "date": "07-21-2023" + }, + { + "name": "OLV Hemelvaart", + "date": "08-15-2023" + }, + { + "name": "Allerheiligen", + "date": "11-01-2023" + }, + { + "name": "Wapenstilstand", + "date": "11-11-2023" + }, + { + "name": "Kerstmis", + "date": "12-25-2023" + } +] \ No newline at end of file diff --git a/tests/HolidaysTest.php b/tests/HolidaysTest.php index 2ae51f69f..8086ed21f 100644 --- a/tests/HolidaysTest.php +++ b/tests/HolidaysTest.php @@ -1,15 +1,18 @@ toMatchSnapshot(); }); -it('can get all holidays of another year', function () { +it('can get all holidays of 2022', function () { $holidays = Holidays::new() ->year(2022) ->get(); @@ -17,9 +20,25 @@ expect($holidays)->toMatchSnapshot(); }); +it('can get all holidays of 2023', function () { + $holidays = Holidays::new() + ->year(2023) + ->get(); + + expect($holidays)->toMatchSnapshot(); +}); + +it('can get all holidays of 2025', function () { + $holidays = Holidays::new() + ->year(2023) + ->get(); + + expect($holidays)->toMatchSnapshot(); +}); + it('can get all holidays of another year and a specific country', function () { $holidays = Holidays::new() - ->year(2022) + ->year(2023) ->country('BE') ->get(); @@ -27,7 +46,7 @@ }); it('cannot get all holidays of an unknown country code', function () { - dd(Holidays::new()->country('unknown')->get()); + Holidays::new()->country('unknown')->get(); })->throws(HolidaysException::class, 'Country code `unknown` is not supported'); it('cannot get holidays for years before 1970', function () {