Last active
November 11, 2016 10:24
-
-
Save mass6/8d003d7cc0339e687926da3d3b6f9d4d to your computer and use it in GitHub Desktop.
Setting up phpunit env variables to use sqlite database for testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"> | |
<testsuites> | |
<testsuite name="Application Test Suite"> | |
<directory suffix="Test.php">./tests</directory> | |
</testsuite> | |
</testsuites> | |
<filter> | |
<whitelist processUncoveredFilesFromWhitelist="true"> | |
<directory suffix=".php">./app</directory> | |
</whitelist> | |
</filter> | |
<php> | |
<env name="APP_ENV" value="testing"/> | |
<env name="APP_URL" value="http://localhost"/> | |
<env name="CACHE_DRIVER" value="array"/> | |
<env name="SESSION_DRIVER" value="array"/> | |
<env name="QUEUE_DRIVER" value="sync"/> | |
<env name="DB_CONNECTION" value="sqlite"/> | |
<env name="DB_DATABASE" value=":memory:"/> | |
</php> | |
</phpunit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment