Skip to content
Snippets Groups Projects
Commit e9211491 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add phpunit tests

parent 0e5b5b99
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,6 @@ Run > phpunit TestFile.php ...@@ -17,6 +17,6 @@ Run > phpunit TestFile.php
If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit". If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".
* Generate a report of Unit tests code coverage: * Generate a report of Unit tests code coverage:
Run > phpunit --coverage-html ./report MyTestSuite.php Run > phpunit [--configuration ./phpunittestok.xml] --coverage-html ./report MyTestSuite.php
Note that xdebug must be installed for this feature to work. Note that xdebug must be installed for this feature to work.
<phpunit backupGlobals="false"
backupStaticAttributes="true"
bootstrap="/path/to/bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
stopOnFailure="true"
syntaxCheck="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader">
<filter>
<blacklist>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</blacklist>
<whitelist>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</whitelist>
</filter>
</phpunit>
\ No newline at end of file
<phpunit>
<filter>
<blacklist>
<directory suffix=".php">../test/</directory>
</blacklist>
<whitelist>
<directory suffix=".php">../htdocs/</directory>
</whitelist>
</filter>
</phpunit>
\ No newline at end of file
<phpunit>
<filter>
<blacklist>
<directory suffix=".php">../test/</directory>
</blacklist>
</filter>
</phpunit>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment