Skip to content

Commit

Permalink
polish hungary
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jan 17, 2024
1 parent 384497e commit 36fca06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 48 deletions.

This file was deleted.

9 changes: 7 additions & 2 deletions tests/Countries/HungaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
it('can calculate hungarian holidays', function () {
CarbonImmutable::setTestNowAndTimezone('2024-01-01');

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

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

expect($holidays[0]['name'])->toBe('Újév');
expect($holidays[0]['date']->format('Y-m-d'))->toBe('2024-01-01');

Check failure on line 18 in tests/Countries/HungaryTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Cannot call method format() on string.

Check failure on line 18 in tests/Countries/HungaryTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Unable to resolve the template type TValue in call to function expect

Check failure on line 18 in tests/Countries/HungaryTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Cannot call method format() on string.

Check failure on line 18 in tests/Countries/HungaryTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Unable to resolve the template type TValue in call to function expect
});

0 comments on commit 36fca06

Please sign in to comment.