Skip to content

Commit fe86a13

Browse files
author
Tabea David
committed
updating readme
1 parent a5da7c1 commit fe86a13

8 files changed

+96
-6
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ This module provides a set of useful validation methods.
88
- [Examples](doc/examples.md)
99
- [Available Validators](doc/validators.md)
1010
- [Error Messages](doc/messages.md)
11+
- [phpunit Testing](doc/phpunit.md)

doc/examples.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- [➻ Examples](examples.md)
44
- [Available Validators](validators.md)
55
- [Error Messages](messages.md)
6+
- [phpunit Testing](phpunit.md)
67

78

89
# Validation for ProcessWire: Examples

doc/installation.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- [Examples](examples.md)
44
- [Available Validators](validators.md)
55
- [Error Messages](messages.md)
6+
- [phpunit Testing](phpunit.md)
67

78

89
# Validation for ProcessWire: Installation

doc/messages.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- [Examples](examples.md)
44
- [Available Validators](validators.md)
55
- [➻ Error Messages](messages.md)
6+
- [phpunit Testing](phpunit.md)
67

78

89
# Validation for ProcessWire: Error Messages

doc/phpunit.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
```

doc/validators.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- [Examples](examples.md)
44
- [➻ Available Validators](validators.md)
55
- [Error Messages](messages.md)
6+
- [phpunit Testing](phpunit.md)
67

78

89
# Validation for ProcessWire: Validators

phpunit-log.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
bootstrap="./tests/bootstrap.php"
4+
printerFile="./vendor/whatthejeff/nyancat-phpunit-resultprinter/src/NyanCat/PHPUnit/ResultPrinter.php"
5+
printerClass="NyanCat\PHPunit\ResultPrinter">
6+
7+
<testsuites>
8+
<testsuite name="Val">
9+
<directory>tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
13+
<logging>
14+
<log type="coverage-html" target="./log/codecoverage" charset="UTF-8"
15+
yui="true" highlight="true"
16+
lowUpperBound="35" highLowerBound="70"/>
17+
<log type="testdox-html" target="./log/testdox.html" />
18+
</logging>
19+
20+
<filter>
21+
<blacklist>
22+
<directory suffix=".php">vendor</directory>
23+
<file>Validator.module</file>
24+
</blacklist>
25+
</filter>
26+
27+
</phpunit>

phpunit.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
</testsuite>
1111
</testsuites>
1212

13-
<logging>
14-
<log type="coverage-html" target="./log/codecoverage" charset="UTF-8"
15-
yui="true" highlight="true"
16-
lowUpperBound="35" highLowerBound="70"/>
17-
<log type="testdox-html" target="./log/testdox.html" />
18-
</logging>
13+
<filter>
14+
<blacklist>
15+
<directory suffix=".php">vendor</directory>
16+
<file>Validator.module</file>
17+
</blacklist>
18+
</filter>
1919

2020
</phpunit>

0 commit comments

Comments
 (0)