diff --git a/src/Countries/Iran.php b/src/Countries/Iran.php index 981f5e618..a70be6c58 100644 --- a/src/Countries/Iran.php +++ b/src/Countries/Iran.php @@ -2,15 +2,13 @@ namespace Spatie\Holidays\Countries; -use Carbon\CarbonImmutable; - class Iran extends Country { public function countryCode(): string { return 'ir'; } - + protected function allHolidays(int $year): array { return [ @@ -26,4 +24,4 @@ protected function allHolidays(int $year): array 'قیام ۱۵ خرداد' => '06-04', ]; } -} \ No newline at end of file +} diff --git a/tests/Countries/IranTest.php b/tests/Countries/IranTest.php index 7ceb54944..0c5c23f04 100644 --- a/tests/Countries/IranTest.php +++ b/tests/Countries/IranTest.php @@ -7,20 +7,20 @@ it('can calculate iran holidays', function () { CarbonImmutable::setTestNow('2024-01-01'); - + $holidays = Holidays::for(country: 'ir')->get(); - + expect($holidays) ->toBeArray() ->not()->toBeEmpty(); - + expect(formatDates($holidays))->toMatchSnapshot(); }); it('can calculate iran holidays in local', function (string $locale, string $newYearsDayName) { CarbonImmutable::setTestNow('2024-01-01'); $result = Holidays::for(country: 'ir', year: null, locale: $locale)->get(); - + expect($result)->toBeArray(); expect($result[7]['name'])->toBe($newYearsDayName); })->with( @@ -28,4 +28,4 @@ ['en', 'Sizdah Bedar'], ['fa', 'سیزده بدر'], ] -); \ No newline at end of file +);