Ran
|
Jobs
5
|
Files
262
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Generators: add initial set of tests (#671) These new tests safeguard the output generated by the `Text`, `Markdown` and `HTML` doc generators and the logic in the abstract `Generator` class. **Notes about the setup for these tests**: These tests use a set of test fixtures specially crafted for these tests. The use of fixtures means that the tests don't use _real_ documentation as included with the various standards, which is subject to change and would make the tests unstable. As the test fixtures are set up as an external standard, these tests will not only safeguard that doc generation works as expected, but also that it continues to work with external standards. This should help prevent issues as previously fixed in a10bea65d and e5bdaad26. The footer output for the `Markdown` and `HTML` generators contains a date and a PHPCS version nr, which, again, would make the tests unstable. To mitigate this, test double classes are included for these classes, which overload the `printFooter()` methods and replaces the date and PHPCS version number with placeholders for the generic documentation tests. The _real_ footer is still tested, but via a regex pattern in a separate test in the `MarkdownTest` and `HTMLTest` classes. Finally, as things were, the tests for `Markdown` and `HTML` would fail on Windows due to the generated output containing mixed line endings in the HTML `<style>` tag and in the code samples for both. Commit 85b4a9065 previously changed the EOL char used for output to screen to `PHP_EOL`, but these two places were overlooked. That is now fixed via this commit.
5 of 5 new or added lines in 2 files covered. (100.0%)
18579 of 24563 relevant lines covered (75.64%)
74.73 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | os-windows-latest-php-8.4-custom-ini-false - 11826554247.1 | 262 |
1.45 |
GitHub Action Run | |
2 | os-ubuntu-latest-php-8.1-custom-ini-true - 11826554247.2 | 262 |
74.1 |
GitHub Action Run | |
3 | os-ubuntu-latest-php-8.4-custom-ini-false - 11826554247.3 | 262 |
74.1 |
GitHub Action Run | |
4 | os-windows-latest-php-7.2-custom-ini-false - 11826554247.4 | 262 |
1.18 |
GitHub Action Run | |
5 | os-ubuntu-latest-php-7.2-custom-ini-false - 11826554247.5 | 262 |
71.92 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|