79584232

Date: 2025-04-21 08:04:03
Score: 0.5
Natty:
Report link

This normally happens when the framework hasn't been booted. In most cases, you're extending the wrong TestCase class. If you extend the PHPUnit base TestCase class the framework isn't booted.

Worked for me adding parent::setUp(); in public function setUp():

abstract class TestCase extends BaseTestCase
{
    public function setUp(): void
    {
        parent::setUp();

        // Do your extra thing here
    }
}

Source: https://laracasts.com/discuss/channels/laravel/test-error-only-when-running-suite-target-class-config-does-not-exist

Reasons:
  • Whitelisted phrase (-1): Worked for me
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Timur Bayan