Question : a facade root has not been set laravel
Answered by : tiago-frana
//Remove:
use PHPUnit\Framework\TestCase;
//And replace it with:
use Tests\TestCase;
Source : | Last Update : Thu, 21 Oct 21
Question : a facade root has not been set laravel 7
Answered by : tiago-frana
## Do not forget to call parent::setUp(); before.
//fails
public function setUp(): void
{ Config::set('something', true);
}
//works !!!!
public function setUp(): void
{ parent::setUp(); Config::set('something', true);
}
Source : https://stackoverflow.com/questions/35418810/eloquent-error-a-facade-root-has-not-been-set | Last Update : Fri, 29 Oct 21
Question : A facade root has not been set.
Answered by : dylan-mukoko
use Tests\TestCase;
Source : https://stackoverflow.com/questions/35418810/eloquent-error-a-facade-root-has-not-been-set | Last Update : Mon, 25 Oct 21