The assertDatabaseHas is part of the trait InteractsWithDatabase ( see: https://github.com/laravel/framework/blob/6.x/src/Illuminate/F... )
That is added to the use Illuminate\Foundation\Testing\TestCase ( see: https://github.com/laravel/framework/blob/6.x/src/Illuminate/F... )
If you let your DatabaseTest extend Illuminate\Foundation\Testing\TestCase instead of PHPUnit\Framework\TestCase you got this assertions.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.