|
2 | 2 |
|
3 | 3 | ## Contributions |
4 | 4 |
|
5 | | -We expect all contributions to |
6 | | -- conform to our [style guide](./styleguide.md), |
7 | | -- be commented (inside the PHP source files), |
8 | | -- be documented (in the [user guide](https://codeigniter4.github.io/userguide/)), |
9 | | -- and unit tested (in the [test folder](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests)). |
| 5 | +We expect the following in all pull requests. |
| 6 | +- All git commits are [GPG-signed](#signing) |
| 7 | +- Must follow our [style guide](#php-style) |
| 8 | +- Be [commented](#comments) in the PHP source file |
| 9 | +- Be documented in the [user guide](#user-guide) |
| 10 | +- Be [unit tested](#unit-testing) |
| 11 | +- Pass all checks in GitHub Actions |
10 | 12 |
|
11 | 13 | > [!IMPORTANT] |
12 | 14 | > We expect all code changes or bug-fixes to be accompanied by one or more tests |
13 | 15 | > added to our test suite to prove the code works. |
14 | 16 |
|
15 | | -If pull requests are not accompanied by relevant tests, they will likely be closed. |
| 17 | +If pull requests do not comply with the above, they will likely be closed. |
16 | 18 | Since we are a team of volunteers, we don't have any more time to work on the |
17 | 19 | framework than you do. Please make it as painless for your contributions to be |
18 | 20 | included as possible. |
19 | 21 |
|
20 | | -If you need help with getting tests running on your local machines, ask for help |
21 | | -on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would |
22 | | -be happy to help out. |
23 | | - |
24 | 22 | The [Open Source Guide](https://opensource.guide/) is a good first read for those |
25 | 23 | new to contributing to open source! |
26 | 24 |
|
@@ -67,13 +65,18 @@ composer cs |
67 | 65 |
|
68 | 66 | If you are not familiar with Unit Testing, see |
69 | 67 | [the forum thread](https://forum.codeigniter.com/showthread.php?tid=81830). |
| 68 | +If you need help with getting tests running on your local machines, ask for help |
| 69 | +on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would |
| 70 | +be happy to help out. |
70 | 71 |
|
71 | 72 | Unit testing is expected for all CodeIgniter components. We use PHPUnit, |
72 | 73 | and run unit tests using GitHub Actions for each PR submitted or changed. |
73 | 74 |
|
74 | | -In the CodeIgniter project, there is a `tests` folder, with a structure |
| 75 | +In the CodeIgniter project, there is a [tests][tests-folder] folder, with a structure |
75 | 76 | that parallels that of `system`. |
76 | 77 |
|
| 78 | +[tests-folder]: https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests |
| 79 | + |
77 | 80 | The normal practice would be to have a unit test class for each of the |
78 | 81 | classes in `system`, named appropriately. For instance, the `BananaTest` |
79 | 82 | class would test the `Banana` class. There will be occasions when it is |
|
0 commit comments