aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/md/Unit-tests.md
diff options
context:
space:
mode:
authorVirtualTam <virtualtam+github@flibidi.net>2017-08-06 16:15:32 +0200
committerGitHub <noreply@github.com>2017-08-06 16:15:32 +0200
commitc7fcea1347e81072c5b77c1b3c2c6fb13f02c16f (patch)
tree03e4d7bbdcfebdb704266caf4b5c0d87e90c02ce /doc/md/Unit-tests.md
parent4758c18164f8168be0b3e422c4af86827c913390 (diff)
parentf320efd689f17737ccbdef46cdc430d9e637b807 (diff)
downloadShaarli-c7fcea1347e81072c5b77c1b3c2c6fb13f02c16f.tar.gz
Shaarli-c7fcea1347e81072c5b77c1b3c2c6fb13f02c16f.tar.zst
Shaarli-c7fcea1347e81072c5b77c1b3c2c6fb13f02c16f.zip
Merge pull request #917 from virtualtam/documentation/fixes+improvements
Documentation fixes, improvements and additions
Diffstat (limited to 'doc/md/Unit-tests.md')
-rw-r--r--doc/md/Unit-tests.md27
1 files changed, 15 insertions, 12 deletions
diff --git a/doc/md/Unit-tests.md b/doc/md/Unit-tests.md
index 19838721..d200634f 100644
--- a/doc/md/Unit-tests.md
+++ b/doc/md/Unit-tests.md
@@ -3,8 +3,9 @@
3The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool. 3The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
4 4
5Regarding Composer, you can either use: 5Regarding Composer, you can either use:
6* a system-wide version, e.g. installed through your distro's package manager 6
7* a local version, downloadable [here](https://getcomposer.org/download/) 7- a system-wide version, e.g. installed through your distro's package manager
8- a local version, downloadable [here](https://getcomposer.org/download/)
8 9
9#### Sample usage 10#### Sample usage
10 11
@@ -118,18 +119,20 @@ Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
118By default, PHPUnit will run all suitable tests found under the `tests` directory. 119By default, PHPUnit will run all suitable tests found under the `tests` directory.
119 120
120Each test has 3 possible outcomes: 121Each test has 3 possible outcomes:
121* `.` - success 122
122* `F` - failure: the test was run but its results are invalid 123- `.` - success
123 * the code does not behave as expected 124- `F` - failure: the test was run but its results are invalid
124 * dependencies to external elements: globals, session, cache... 125 - the code does not behave as expected
125* `E` - error: something went wrong and the tested code has crashed 126 - dependencies to external elements: globals, session, cache...
126 * typos in the code, or in the test code 127- `E` - error: something went wrong and the tested code has crashed
127 * dependencies to missing external elements 128 - typos in the code, or in the test code
129 - dependencies to missing external elements
128 130
129If Xdebug has been installed and activated, two coverage reports will be generated: 131If Xdebug has been installed and activated, two coverage reports will be generated:
130* a summary in the console 132
131* a detailed HTML report with metrics for tested code 133- a summary in the console
132 * to open it in a web browser: `firefox coverage/index.html &` 134- a detailed HTML report with metrics for tested code
135 - to open it in a web browser: `firefox coverage/index.html &`
133 136
134### Executing specific tests 137### Executing specific tests
135 138