generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2900145
commit 122de2e
Showing
5 changed files
with
173 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...st/snapshots/Countries/GhanaTest/it_can_calculate_Ghana_date_based_regional_holidays.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"name": "New Year's Day", | ||
"date": "2024-01-01" | ||
}, | ||
{ | ||
"name": "Constitution Day", | ||
"date": "2024-01-07" | ||
}, | ||
{ | ||
"name": "Independence Day", | ||
"date": "2024-03-06" | ||
}, | ||
{ | ||
"name": "Good Friday", | ||
"date": "2024-03-29" | ||
}, | ||
{ | ||
"name": "Easter Monday", | ||
"date": "2024-04-01" | ||
}, | ||
{ | ||
"name": "May Day", | ||
"date": "2024-05-01" | ||
}, | ||
{ | ||
"name": "Founder's Day", | ||
"date": "2024-08-04" | ||
}, | ||
{ | ||
"name": "Kwame Nkrumah Memorial Day", | ||
"date": "2024-09-21" | ||
}, | ||
{ | ||
"name": "Christmas Day", | ||
"date": "2024-12-25" | ||
}, | ||
{ | ||
"name": "Boxing Day", | ||
"date": "2024-12-26" | ||
} | ||
] |
42 changes: 42 additions & 0 deletions
42
...st/snapshots/Countries/GhanaTest/it_can_calculate_Ghana_easter_based_region_holidays.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"name": "New Year's Day", | ||
"date": "2024-01-01" | ||
}, | ||
{ | ||
"name": "Constitution Day", | ||
"date": "2024-01-07" | ||
}, | ||
{ | ||
"name": "Independence Day", | ||
"date": "2024-03-06" | ||
}, | ||
{ | ||
"name": "Good Friday", | ||
"date": "2024-03-29" | ||
}, | ||
{ | ||
"name": "Easter Monday", | ||
"date": "2024-04-01" | ||
}, | ||
{ | ||
"name": "May Day", | ||
"date": "2024-05-01" | ||
}, | ||
{ | ||
"name": "Founder's Day", | ||
"date": "2024-08-04" | ||
}, | ||
{ | ||
"name": "Kwame Nkrumah Memorial Day", | ||
"date": "2024-09-21" | ||
}, | ||
{ | ||
"name": "Christmas Day", | ||
"date": "2024-12-25" | ||
}, | ||
{ | ||
"name": "Boxing Day", | ||
"date": "2024-12-26" | ||
} | ||
] |
42 changes: 42 additions & 0 deletions
42
tests/.pest/snapshots/Countries/GhanaTest/it_can_calculate_Ghana_holidays.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"name": "New Year's Day", | ||
"date": "2024-01-01" | ||
}, | ||
{ | ||
"name": "Constitution Day", | ||
"date": "2024-01-07" | ||
}, | ||
{ | ||
"name": "Independence Day", | ||
"date": "2024-03-06" | ||
}, | ||
{ | ||
"name": "Good Friday", | ||
"date": "2024-03-29" | ||
}, | ||
{ | ||
"name": "Easter Monday", | ||
"date": "2024-04-01" | ||
}, | ||
{ | ||
"name": "May Day", | ||
"date": "2024-05-01" | ||
}, | ||
{ | ||
"name": "Founder's Day", | ||
"date": "2024-08-04" | ||
}, | ||
{ | ||
"name": "Kwame Nkrumah Memorial Day", | ||
"date": "2024-09-21" | ||
}, | ||
{ | ||
"name": "Christmas Day", | ||
"date": "2024-12-25" | ||
}, | ||
{ | ||
"name": "Boxing Day", | ||
"date": "2024-12-26" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Spatie\Holidays\Tests\Countries; | ||
|
||
use Carbon\CarbonImmutable; | ||
use Spatie\Holidays\Countries\France; | ||
use Spatie\Holidays\Holidays; | ||
|
||
it('can calculate Ghana holidays', function () { | ||
CarbonImmutable::setTestNowAndTimezone('2024-01-01'); | ||
|
||
$holidays = Holidays::for(country: 'gh')->get(); | ||
|
||
expect($holidays) | ||
->toBeArray() | ||
->not()->toBeEmpty(); | ||
|
||
expect(formatDates($holidays))->toMatchSnapshot(); | ||
}); | ||
|
||
it('can calculate Ghana easter based region holidays', function () { | ||
CarbonImmutable::setTestNowAndTimezone('2024-01-01'); | ||
|
||
$holidays = Holidays::for(country: 'gh')->get(); | ||
|
||
expect($holidays) | ||
->toBeArray() | ||
->not()->toBeEmpty(); | ||
|
||
expect(formatDates($holidays))->toMatchSnapshot(); | ||
}); | ||
|
||
it('can calculate Ghana date based regional holidays', function () { | ||
CarbonImmutable::setTestNowAndTimezone('2024-01-01'); | ||
|
||
$holidays = Holidays::for(country: 'gh')->get(); | ||
|
||
expect($holidays) | ||
->toBeArray() | ||
->not()->toBeEmpty(); | ||
|
||
expect(formatDates($holidays))->toMatchSnapshot(); | ||
}); |