pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.07k stars 315 forks source link

[Bug]: Target class [translator] does not exist. In higher order tests. #1099

Open mokhosh opened 4 months ago

mokhosh commented 4 months ago

What Happened

This works:

it('has a title', function () {
    get('/')->assertSee(__('support.title'));
});

This doesn't

it('has a title')
    ->get('/')
    ->assertSee(__('support.title'));

How to Reproduce

Copy paste the above code into a pest test.

Sample Repository

No response

Pest Version

2.33.6

PHP Version

8.3.3

Operation System

macOS

Notes

No response