I'm making tests for an application in Laravel and I want to change the default config of the environment variable. In Laravel documentation:
When running unit tests, Laravel will automatically set the configuration environment to testing. You are free to create other testing environment configurations as necessary. The testing environment variables may be configured in the phpunit.xml file.
How can I change the environment from phpunit.xml?
Here is the file:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./app/tests/</directory>
</testsuite>
</testsuites>
</phpunit>