diff --git a/src/Countries/DominicanRepublic.php b/src/Countries/DominicanRepublic.php new file mode 100644 index 000000000..c632ae430 --- /dev/null +++ b/src/Countries/DominicanRepublic.php @@ -0,0 +1,29 @@ + */ + protected function allHolidays(int $year): array + { + return [ + 'Año Nuevo' => '01-01', + 'Día de la Altagracia' => '01-21', + 'Día de Duarte' => '01-26', + 'Día de la Independencia' => '02-27', + 'Día del Trabajo' => '05-01', + 'Día de la Restauración' => '08-16', + 'Día de las Mercedes' => '09-24', + 'Día de la Constitución' => '11-06', + 'Navidad' => '12-25', + ]; + } +} diff --git a/tests/.pest/snapshots/Countries/DominicanRepublicTest/it_can_calculate_dominican_republic_holidays.snap b/tests/.pest/snapshots/Countries/DominicanRepublicTest/it_can_calculate_dominican_republic_holidays.snap new file mode 100644 index 000000000..3bdd36d0d --- /dev/null +++ b/tests/.pest/snapshots/Countries/DominicanRepublicTest/it_can_calculate_dominican_republic_holidays.snap @@ -0,0 +1,38 @@ +[ + { + "name": "A\u00f1o Nuevo", + "date": "2024-01-01" + }, + { + "name": "D\u00eda de la Altagracia", + "date": "2024-01-21" + }, + { + "name": "D\u00eda de Duarte", + "date": "2024-01-26" + }, + { + "name": "D\u00eda de la Independencia", + "date": "2024-02-27" + }, + { + "name": "D\u00eda del Trabajo", + "date": "2024-05-01" + }, + { + "name": "D\u00eda de la Restauraci\u00f3n", + "date": "2024-08-16" + }, + { + "name": "D\u00eda de las Mercedes", + "date": "2024-09-24" + }, + { + "name": "D\u00eda de la Constituci\u00f3n", + "date": "2024-11-06" + }, + { + "name": "Navidad", + "date": "2024-12-25" + } +] \ No newline at end of file diff --git a/tests/Countries/DominicanRepublicTest.php b/tests/Countries/DominicanRepublicTest.php new file mode 100644 index 000000000..7a388eda6 --- /dev/null +++ b/tests/Countries/DominicanRepublicTest.php @@ -0,0 +1,19 @@ +get(); + + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect(formatDates($holidays))->toMatchSnapshot(); +}); +