Answer the question
In order to leave comments, you need to log in
How to connect a live database in setUpBeforeClass() and setUp() in phpunit?
I do not need to create a new database from migrations and all that, I just need to create / delete a user before testing.
class ApiUserCreateErrorsTest extends TestCase
{
public static function setUpBeforeClass(): void
{
parent::setUpBeforeClass();
User::where('email', '[email protected]')->delete();
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question