New: Add phpunit tests
This commit is contained in:
parent
0e5b5b9946
commit
e921149135
@ -17,6 +17,6 @@ Run > phpunit TestFile.php
|
||||
If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".
|
||||
|
||||
* 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.
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
<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>
|
||||
10
test/phpunittestko.xml
Normal file
10
test/phpunittestko.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<phpunit>
|
||||
<filter>
|
||||
<blacklist>
|
||||
<directory suffix=".php">../test/</directory>
|
||||
</blacklist>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../htdocs/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
7
test/phpunittestok.xml
Normal file
7
test/phpunittestok.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<phpunit>
|
||||
<filter>
|
||||
<blacklist>
|
||||
<directory suffix=".php">../test/</directory>
|
||||
</blacklist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
Loading…
Reference in New Issue
Block a user