RefreshDatabase trait breaks feature tests for Passport api
I have several features in an api I'm creating, using Passport for token authentication. I am looking to streamline my tests, and the first part of the Laravel documentation says to use the RefreshDatabase trait to reset the database for each test.
And that's the proper way you should do your tests, each test should start with a clean state and not depend on each other. For initializing a state before each test you can use PHPUnit's setUp() function, which will initialize whatever is needed before each test. And you should be using a factory which creates the tokens.