@shawnveltman Have you tried the 1using1 method on the RefreshDatabase trait? This method takes an array of database connections as its argument.
For example-
/**
* @test
*/
public function test_something()
{
$this->using([
'primary_db',
'secondary_db'
])->refreshDatabase();
// ...
}
This will refresh the primary_db and secondary_db connections.
You can also use the connectionsToTransact method to specify which connections should be rolled back at the end of the test. This method takes an array of database connections as its argument.
For example-
use RefreshDatabase;
/**
* @test
*/
public function test_something()
{
$this->using([
'primary_db',
'secondary_db'
])->connectionsToTransact([
'secondary_db'
])->refreshDatabase();
// ...
}
This will refresh the primary_db and secondary_db connections, and will only roll back the secondary_db connection at the end of the test.