Skip to content

Commit

Permalink
Add Slovakia test
Browse files Browse the repository at this point in the history
  • Loading branch information
patressz committed Jan 18, 2024
1 parent eb53eab commit bff08d2
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"name": "De\u0148 vzniku Slovenskej republiky",
"date": "2024-01-01"
},
{
"name": "Zjavenie P\u00e1na (Traja kr\u00e1li)",
"date": "2024-01-06"
},
{
"name": "Ve\u013ek\u00fd piatok",
"date": "2024-03-29"
},
{
"name": "Ve\u013ekono\u010dn\u00fd pondelok",
"date": "2024-04-01"
},
{
"name": "Sviatok pr\u00e1ce",
"date": "2024-05-01"
},
{
"name": "De\u0148 v\u00ed\u0165azstva nad fa\u0161izmom",
"date": "2024-05-08"
},
{
"name": "Sviatok sv\u00e4t\u00e9ho Cyrila a Metoda",
"date": "2024-07-05"
},
{
"name": "V\u00fdro\u010die V\u00fdro\u010die Slovensk\u00e9ho n\u00e1rodn\u00e9ho povstania",
"date": "2024-08-29"
},
{
"name": "De\u0148 \u00dastavy Slovenskej republiky",
"date": "2024-09-01"
},
{
"name": "Sedembolestn\u00e1 Panna M\u00e1ria",
"date": "2024-09-15"
},
{
"name": "De\u0148 vzniku samostatn\u00e9ho \u010desko-slovensk\u00e9ho \u0161t\u00e1tu",
"date": "2024-10-28"
},
{
"name": "Sviatok v\u0161etk\u00fdch sv\u00e4t\u00fdch",
"date": "2024-11-01"
},
{
"name": "De\u0148 boja za slobodu a demokraciu",
"date": "2024-11-17"
},
{
"name": "\u0160tedr\u00fd de\u0148",
"date": "2024-12-24"
},
{
"name": "Prv\u00fd sviatok viano\u010dn\u00fd",
"date": "2024-12-25"
},
{
"name": "Druh\u00fd sviatok viano\u010dn\u00fd",
"date": "2024-12-26"
}
]
18 changes: 18 additions & 0 deletions tests/Countries/SlovakiaTest.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 slovak holidays', function () {
CarbonImmutable::setTestNowAndTimezone('2024-01-01');

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

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

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

0 comments on commit bff08d2

Please sign in to comment.