Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach authored and github-actions[bot] committed Feb 1, 2024
1 parent d99af11 commit d821460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/Countries/Iran.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand All @@ -26,4 +24,4 @@ protected function allHolidays(int $year): array
'قیام ۱۵ خرداد' => '06-04',
];
}
}
}
10 changes: 5 additions & 5 deletions tests/Countries/IranTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@

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(
[
['en', 'Sizdah Bedar'],
['fa', 'سیزده بدر'],
]
);
);

0 comments on commit d821460

Please sign in to comment.