Added test and coverage notes to Readme.

This commit is contained in:
Lonnie Ezell 2015-08-28 23:29:10 -05:00
parent 77fc23faae
commit 2740d6e2cd
2 changed files with 21 additions and 1 deletions

View File

@ -9,4 +9,19 @@ We are not accepting contributions from the public until a stable enough base ha
## Server Requirements
PHP version 7 is required.
You can obtain a working Vagrant box from Rasmus Lerdorf [here](https://github.com/rlerdorf/php7dev).
You can obtain a working Vagrant box from Rasmus Lerdorf [here](https://github.com/rlerdorf/php7dev).
## Tests
Tests are done using the latest version of PHPUnit, which is currently 4.8.x. It is easiest to [install it globally using Composer](https://phpunit.de/manual/current/en/installation.html#installation.composer). Tests are restricted to classes within the `/system` directory, and the directory structure should of the tests should mimic the directory structure of `/system`.
### Running Tests
Tests are run from the command line from the project root - the same folder that has the `phpunit.xml` file in it.
$ phpunit
Simply calling this will run the entire test suite.
### Checking Code Coverage
Code Coverage requires that XDebug is also install and running in your current PHP setup. The following command will run coverage, provide a coverage report on screen, in a text file (coverage.txt) and within the /coverage directory.
$ phpunit --colors --coverage-text=coverage.txt --coverage-html=coverage/

View File

@ -13,4 +13,9 @@
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./system</directory>
</whitelist>
</filter>
</phpunit>