Hey there,
Starting with Laravel 8 the trait: RefreshDatabase can look for a class var: "seed" . if you add: protected $seed = true; as a class variable, it will trigger the migration + the seeder.
This is what it would look like in your example case:
abstract class TestCase extends BaseTestCase
{
use CreatesApplication, RefreshDatabase;
protected $seed = true;
// Your tests here.
}
But on to your main question, Why isn't this working!?:
If I purely look at your given code, the “migrate” functionality isn't triggered, and PHPUnit might be connected to a different database connection than the one you would expect. Check the phpunit.xml file if the property: DB_CONNECTION is set to anything other than what your main application uses.
It is a bit of a stretch, but all I can find with the limited information.
Hope this helps.