"A facade root has not been set." in a Laravel 5.5 PHPUnit test almost always means one thing: your test touched a facade like DB , Schema or Config before Laravel had booted. The fix usually takes a few minutes once you know where in the PHPUnit lifecycle the call happens.
Quick answer: Look for facade calls in three places: setUpBeforeClass() , @dataProvider methods, and your test class constructor. All three run before Laravel creates the application. Move those calls into setUp() after parent::setUp() , or into the test method itself. Then confirm the test extends Tests\TestCase , not PHPUnit's base TestCase .
This is an old, well-understood testing problem rather than a framework bug.…