diff --git a/tests/Feature/UserTest.php b/tests/Feature/UserTest.php index 6c5c38d..9fdbcd0 100644 --- a/tests/Feature/UserTest.php +++ b/tests/Feature/UserTest.php @@ -1,12 +1,18 @@ group('file group'); $makeUser = fn () => new User(18, 'John'); -beforeEach(fn () => $this->sut = $makeUser()); +beforeEach(function () use ($makeUser) { + $this->sut = $makeUser(); +}); test('class constructor') ->expect($makeUser)