Skip to content

Commit

Permalink
use our invade package instead of Reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Jan 25, 2024
1 parent 76a87d7 commit 1fa7a39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"laravel/prompts": "^0.1.15",
"pestphp/pest": "^2.31",
"phpstan/phpstan": "^1.10.56",
"spatie/invade": "^2.0",
"spatie/ray": "^1.40.1",
"symfony/var-dumper": "^6.4"
},
Expand Down
6 changes: 1 addition & 5 deletions tests/CountryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

namespace Spatie\Holidays\Tests;

use ReflectionMethod;
use Spatie\Holidays\Countries\Belgium;

it('can calculate orthodox easter', function (int $year, string $date) {
$country = Belgium::make();

$reflectionMethod = new ReflectionMethod('Spatie\Holidays\Countries\Belgium', 'orthodoxEaster');
$reflectionMethod->setAccessible(true);

$easter = $reflectionMethod->invoke($country, $year);
$easter = invade($country)->orthodoxEaster($year);

expect($easter->format('Y-m-d'))->toBe($date);
})->with([
Expand Down

0 comments on commit 1fa7a39

Please sign in to comment.