Created
March 10, 2020 12:33
-
-
Save edgrosvenor/f054f4a7cbd84fbe1ce63e0d27548670 to your computer and use it in GitHub Desktop.
Use Collision's PHPUnit Printer Driver by Default
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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | |
bootstrap="vendor/autoload.php" | |
colors="true" | |
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"> | |
<testsuites> | |
<testsuite name="Unit"> | |
<directory suffix="Test.php">./tests/Unit</directory> | |
</testsuite> | |
<testsuite name="Feature"> | |
<directory suffix="Test.php">./tests/Feature</directory> | |
</testsuite> | |
</testsuites> | |
<filter> | |
<whitelist processUncoveredFilesFromWhitelist="true"> | |
<directory suffix=".php">./app</directory> | |
</whitelist> | |
</filter> | |
<php> | |
<server name="APP_ENV" value="testing"/> | |
<server name="BCRYPT_ROUNDS" value="4"/> | |
<server name="CACHE_DRIVER" value="array"/> | |
<server name="DB_CONNECTION" value="sqlite"/> | |
<server name="DB_DATABASE" value=":memory:"/> | |
<server name="MAIL_MAILER" value="array"/> | |
<server name="QUEUE_CONNECTION" value="sync"/> | |
<server name="SESSION_DRIVER" value="array"/> | |
</php> | |
</phpunit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The difference between this and the default phpunit.xml that ships with Laravel 7 is this line:
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"
inside the main phpunit block.
If you're going to use this outside of Laravel where Collision is installed by default, make sure you install Collision
composer require nunomaduro/collision --dev
and follow the setup instructions.