I upgraded Laravel from 5.8 to 6.0. I run unit tests in docker container using Composer 2 and directly with php vendor/bin/phpunit
(doesn't matter). PHPunit version is 7.5.20. PHP version is 7.3.
All unit tests that have entities with relations are unstable, meaning it can either fall of pass without any changes.
The code looks like this:
$book = factory(Book::class)->create([
'title' => 'test'
]);
I also tried to create related record directlt in the code:
$author = factory(Author::class)->create([])
$book = factory(Book::class)->create([
'title' => 'test',
'author' => $author->getKey()
]);
but it doesn't realy matter. Tests fail randomly. And every time it's either different one or non of them.