Level 63
What's the value for <env name="DB_DATABASE" value="..."/> ?
1 like
hello! i'm running laravel 12 and testing with PHPunit, i have configured it like so in my phpunit.xml:
<env name="DB_CONNECTION" value="pgsql_testing"/>
and in my database.php config:
'pgsql_testing' => [
'driver' => 'pgsql',
'database' => env('DB_DATABASE', '') . '_test',
i use some tests with the RefreshDatabase trait, but when i run my tests my main db gets wiped together with the tests database. i don't understand what i am missing. thanks.
It should work.
I already had a similar problem, I have solved it by clearing the cache.
Please or to participate in this conversation.