All Questions
4 questions
2
votes
3
answers
4k
views
How to use Doctrine Fixture to load test database for PHP unit testing?
I am trying to set a database environment to test my Doctrine ORM Entity classes, without changing my real database.
I followed Symfony's documentation, but when I run php bin/console doctrine:...
10
votes
3
answers
7k
views
Laravel PHPUnit loading .env.testing file
I have some problems with getting Laravel to load the proper .env file for my testcases.
I'm using PHPUnit with the following var set in phpunit.xml:
<?xml version="1.0" encoding="UTF-8"?>
&...
41
votes
10
answers
50k
views
How to specify a different .env file for phpunit in Laravel 5?
I have a .env file containing my database connection details, as is normal for Laravel 5. I want to override these for testing, which I can do in phpunit.xml. However, doing this seems to go against ...
0
votes
1
answer
1k
views
Ignore .env file on unit tests
Most of my classes include loading env variables for configuration. When I was coding I thought vlucas/phpdotenv ignored the .env file on testing environments since there is already a conf file like ...