From 4c006cba167d2d465b767a42f5f9b6dca0e7d7cb Mon Sep 17 00:00:00 2001 From: Martin Welte Date: Sun, 21 Jan 2024 16:47:41 +0100 Subject: [PATCH] test: add switzerland test --- .../it_can_calculate_swiss_holidays.snap | 38 +++++++++++++++++++ tests/Countries/SwitzerlandTest.php | 18 +++++++++ 2 files changed, 56 insertions(+) create mode 100644 tests/.pest/snapshots/Countries/SwitzerlandTest/it_can_calculate_swiss_holidays.snap create mode 100644 tests/Countries/SwitzerlandTest.php diff --git a/tests/.pest/snapshots/Countries/SwitzerlandTest/it_can_calculate_swiss_holidays.snap b/tests/.pest/snapshots/Countries/SwitzerlandTest/it_can_calculate_swiss_holidays.snap new file mode 100644 index 000000000..96cd86c9b --- /dev/null +++ b/tests/.pest/snapshots/Countries/SwitzerlandTest/it_can_calculate_swiss_holidays.snap @@ -0,0 +1,38 @@ +[ + { + "name": "Neujahr", + "date": "2024-01-01" + }, + { + "name": "Berchtoldstag", + "date": "2024-01-02" + }, + { + "name": "Karfreitag", + "date": "2024-03-29" + }, + { + "name": "Ostermontag", + "date": "2024-04-01" + }, + { + "name": "Auffahrt", + "date": "2024-05-09" + }, + { + "name": "Pfingstmontag", + "date": "2024-05-20" + }, + { + "name": "Bundesfeier", + "date": "2024-08-01" + }, + { + "name": "Weihnachtstag", + "date": "2024-12-25" + }, + { + "name": "Stephanstag", + "date": "2024-12-26" + } +] \ No newline at end of file diff --git a/tests/Countries/SwitzerlandTest.php b/tests/Countries/SwitzerlandTest.php new file mode 100644 index 000000000..dff2a2fd1 --- /dev/null +++ b/tests/Countries/SwitzerlandTest.php @@ -0,0 +1,18 @@ +get(); + + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect(formatDates($holidays))->toMatchSnapshot(); +});