Skip to content

Commit

Permalink
Added tests for country Pakistan
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-nauman committed Jan 18, 2024
1 parent 3e724fb commit 61366c5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"name": "Kashmir Solidarity Day",
"date": "2024-02-05"
},
{
"name": "Pakistan Day",
"date": "2024-03-23"
},
{
"name": "Labour Day",
"date": "2024-05-01"
},
{
"name": "Independence Day",
"date": "2024-08-14"
},
{
"name": "Iqbal Day",
"date": "2024-11-09"
},
{
"name": "Quaid-e-Azam Day",
"date": "2024-12-25"
}
]
18 changes: 18 additions & 0 deletions tests/Countries/PakistanTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Spatie\Holidays\Tests\Countries;

use Carbon\CarbonImmutable;
use Spatie\Holidays\Holidays;

it('can calculate pakistan holidays', function () {
CarbonImmutable::setTestNowAndTimezone('2024-01-01');

$holidays = Holidays::for(country: 'pk')->get();

expect($holidays)
->toBeArray()
->not()->toBeEmpty();

expect(formatDates($holidays))->toMatchSnapshot();
});

0 comments on commit 61366c5

Please sign in to comment.