File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Contributing to WebPush
2
2
WebPush is an open source library.
3
3
Feel free to contribute by submitting a pull request or creating (and solving) issues!
4
+
5
+ ## Running Tests
6
+
7
+ First, you will need to create your own configuration file by copying
8
+ phpunit.dist.xml to phpunit.xml and filling in the fields you need for
9
+ testing (i.e. STANDARD_ENDPOINT, GCM_API_KEY etc.).
10
+
11
+ Then, download [ phpunit] ( https://phpunit.de/ ) and test with one of the
12
+ following commands:
13
+
14
+ ** For All Tests**
15
+ ` php phpunit.phar `
16
+
17
+ ** For a Specific Test File**
18
+ ` php phpunit.phar tests/EncryptionTest.php `
19
+
20
+ ** For a Single Test**
21
+ ` php phpunit.phar . --filter "/::testPadPayload( .*)?$/" ` (regex)
22
+
23
+ Some tests have a custom decorator @skipIfTravis . The reason is that
24
+ there's no way in Travis to update the push subscription, so the endpoint
25
+ in my phpunit.travis.xml would ultimately expire
26
+ (and require a human modification), and the corresponding tests would fail.
27
+ But locally, these tests are handy.
Original file line number Diff line number Diff line change @@ -230,8 +230,5 @@ This library was inspired by the Node.js [marco-c/web-push](https://github.com/m
230
230
## Contributing
231
231
See [ CONTRIBUTING.md] ( https://github.com/Minishlink/web-push/blob/master/CONTRIBUTING.md ) .
232
232
233
- ## Tests
234
- Copy ` phpunit.xml ` from ` phpunit.dist.xml ` and fill it with your test endpoints and private keys.
235
-
236
233
## License
237
234
[ MIT] ( https://github.com/Minishlink/web-push/blob/master/LICENSE )
You can’t perform that action at this time.
0 commit comments