Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example PHPUnit configuration file for symfony projects running on 512MB phpUnderControl server
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="true">
<filter>
<blacklist>
<directory>cache</directory>
<directory>data</directory>
<directory>lib/vendor</directory>
<directory>log</directory>
<!-- exclude plugins -->
<directory>plugins</directory>
<directory>web</directory>
</blacklist>
<whitelist>
<!-- lib subfolders to include -->
<directory>lib/exceptions</directory>
<directory>lib/filter</directory>
<directory>lib/form</directory>
<directory>lib/model</directory>
<directory>lib/task</directory>
<directory>lib/validator</directory>
<exclude>
<!-- exclude generated base files of project -->
<directory>lib/filter/base</directory>
<directory>lib/form/base</directory>
<directory>lib/model/map</directory>
<directory>lib/model/om</directory>
<directory>lib/filter/*/base</directory>
<directory>lib/form/*/base</directory>
<directory>lib/model/*/map</directory>
<directory>lib/model/*/om</directory>
<!-- interfaces are not covered -->
<directory suffix=".interface.php">.</directory>
</exclude>
</whitelist>
</filter>
<testsuites>
<testsuite name="Unit Tests">
<directory>test/phpunit/unit/</directory>
</testsuite>
<testsuite name="Functional Tests">
<directory>test/phpunit/functional/</directory>
</testsuite>
</testsuites>
</phpunit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment