mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Added test and coverage notes to Readme.
This commit is contained in:
parent
77fc23faae
commit
2740d6e2cd
17
README.md
17
README.md
@ -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/
|
@ -13,4 +13,9 @@
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./system</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
Loading…
x
Reference in New Issue
Block a user