From 36fca06bfdd6417effbb1ac06692ac1d86f518b5 Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Wed, 17 Jan 2024 11:44:30 +0100 Subject: [PATCH] polish hungary --- .../it_can_calculate_hungarian_holidays.snap | 46 ------------------- tests/Countries/HungaryTest.php | 9 +++- 2 files changed, 7 insertions(+), 48 deletions(-) delete mode 100644 tests/.pest/snapshots/Countries/HungaryTest/it_can_calculate_hungarian_holidays.snap diff --git a/tests/.pest/snapshots/Countries/HungaryTest/it_can_calculate_hungarian_holidays.snap b/tests/.pest/snapshots/Countries/HungaryTest/it_can_calculate_hungarian_holidays.snap deleted file mode 100644 index 7422316e9..000000000 --- a/tests/.pest/snapshots/Countries/HungaryTest/it_can_calculate_hungarian_holidays.snap +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "name": "\u00daj\u00e9v", - "date": "01-01-2024" - }, - { - "name": "1848-as forradalom \u00e9vfordul\u00f3ja", - "date": "15-03-2024" - }, - { - "name": "Nagyp\u00e9ntek", - "date": "29-03-2024" - }, - { - "name": "H\u00fasv\u00e9th\u00e9tf\u0151", - "date": "01-04-2024" - }, - { - "name": "A munka \u00fcnnepe", - "date": "01-05-2024" - }, - { - "name": "P\u00fcnk\u00f6sdh\u00e9tf\u0151", - "date": "20-05-2024" - }, - { - "name": "\u00c1llamalap\u00edt\u00e1s \u00fcnnepe", - "date": "20-08-2024" - }, - { - "name": "1956-os forradalom \u00e9vfordul\u00f3ja", - "date": "23-10-2024" - }, - { - "name": "Mindenszentek", - "date": "01-11-2024" - }, - { - "name": "Kar\u00e1csony", - "date": "25-12-2024" - }, - { - "name": "Kar\u00e1csony m\u00e1snapja", - "date": "26-12-2024" - } -] \ No newline at end of file diff --git a/tests/Countries/HungaryTest.php b/tests/Countries/HungaryTest.php index f1fa0079e..20e80e4c2 100644 --- a/tests/Countries/HungaryTest.php +++ b/tests/Countries/HungaryTest.php @@ -8,7 +8,12 @@ it('can calculate hungarian holidays', function () { CarbonImmutable::setTestNowAndTimezone('2024-01-01'); - $holidays = Holidays::get(country: 'hu'); + $holidays = Holidays::for(country: 'hu')->get(); - expect($holidays)->toMatchSnapshot(); + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect($holidays[0]['name'])->toBe('Újév'); + expect($holidays[0]['date']->format('Y-m-d'))->toBe('2024-01-01'); });