Target class [translator] does not exist.
Hi,
I'm trying to setup my first phpunit test in Laravel 8 and phpStorm. The first test already results in an error I can't fix:
Illuminate\Contracts\Container\BindingResolutionException : Target class [translator] does not exist.
The class being tested is a small simple "enum" class, that's calling __( ... ) for translation. When using the class in the normal situation, it's running just fine. But the phpunit test is giving problems.
Any tips to solve this? Or do you need more information to help me solve this issue?
Kind regards, Marc
You are extending the wrong TestCase which doesn't do any application bootstrapping. Extend the one in your root "tests" folder, not PHPUnit.
Please or to participate in this conversation.