What Happened
When i use pest()->extend(Tests\TestCaseUnit::class)->in('Unit'); in my Pest.php when i run my tests it refreshes my database that i have configured in .env, even when my test database i have theses environment variables inside my phpunit.xml
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
How to Reproduce
On a Laravel application using Pest, add the following to your Pest.php
pest()->extend(Tests\TestCaseUnit::class)->extend(RefreshDatabase::class);
Set the values in phpunit.xml
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
or .env.testing should have
DB_CONNECTION=sqlite
DB_DATABASE=:memory:
Then when running tests, it should refresh the database used in your .env
Sample Repository
No response
Pest Version
4.4.2
PHP Version
8.4
Operation System
macOS
Notes
No response
What Happened
When i use
pest()->extend(Tests\TestCaseUnit::class)->in('Unit');in myPest.phpwhen i run my tests it refreshes my database that i have configured in.env, even when my test database i have theses environment variables inside myphpunit.xmlHow to Reproduce
On a Laravel application using Pest, add the following to your
Pest.phppest()->extend(Tests\TestCaseUnit::class)->extend(RefreshDatabase::class);Set the values in
phpunit.xmlor
.env.testingshould haveThen when running tests, it should refresh the database used in your
.envSample Repository
No response
Pest Version
4.4.2
PHP Version
8.4
Operation System
macOS
Notes
No response