|
| 1 | +#### Navigation |
| 2 | +- [Installation](installation.md) |
| 3 | +- [Examples](examples.md) |
| 4 | +- [Available Validators](validators.md) |
| 5 | +- [Error Messages](messages.md) |
| 6 | +- [➻ phpunit Testing](phpunit.md) |
| 7 | + |
| 8 | + |
| 9 | +# Validation for ProcessWire: phpunit |
| 10 | + |
| 11 | +## Quick Test |
| 12 | + |
| 13 | +- no logging |
| 14 | +- no code coverage |
| 15 | +- configuration file phpunit.xml |
| 16 | + |
| 17 | +``` |
| 18 | +❯ phpunit |
| 19 | +PHPUnit 4.6.2 by Sebastian Bergmann and contributors. |
| 20 | +
|
| 21 | +Configuration read from /.../public/site/modules/Validator/phpunit.xml |
| 22 | +
|
| 23 | + 34 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------, |
| 24 | + 0 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_| /\_/\ |
| 25 | + 0 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-~|_( ^ .^) |
| 26 | + -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- "" "" |
| 27 | +
|
| 28 | +
|
| 29 | +Time: 445 ms, Memory: 28.50Mb |
| 30 | +
|
| 31 | +OK (34 tests, 114 assertions) |
| 32 | +``` |
| 33 | + |
| 34 | +## Test including Code Coverage |
| 35 | + |
| 36 | +- logging |
| 37 | +- code coverage |
| 38 | +- configuration file phpunit-log.xml |
| 39 | +- target log/ |
| 40 | + |
| 41 | +``` |
| 42 | +❯ phpunit --configuration phpunit-log.xml |
| 43 | +PHPUnit 4.6.2 by Sebastian Bergmann and contributors. |
| 44 | +
|
| 45 | +Configuration read from /.../public/site/modules/Validator/phpunit-log.xml |
| 46 | +
|
| 47 | + 34 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------, |
| 48 | + 0 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_| /\_/\ |
| 49 | + 0 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-~|_( ^ .^) |
| 50 | + -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- "" "" |
| 51 | +
|
| 52 | +
|
| 53 | +Time: 20.51 seconds, Memory: 50.75Mb |
| 54 | +
|
| 55 | +OK (34 tests, 114 assertions) |
| 56 | +
|
| 57 | +Generating code coverage report in HTML format ... done |
| 58 | +``` |
0 commit comments