Skip to content

Commit df2a305

Browse files
authored
Merge pull request #739 from ziegenberg/update-phpuni-manual-links
[docs] update links to PHPUnit Manual
2 parents 6163b92 + 0627aaa commit df2a305

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

docs/apis/plugintypes/antivirus/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ Writing unit tests is strongly encouraged as it can help to identify bugs, or ch
109109

110110
Since antivirus plugins typically rely on an external dependency, it is usually a good idea to replace the real component with a test "double". You can see an example of this in Moodle in the [antivirus_clamav unit tests](https://github.com/moodle/moodle/blob/81407f18ecff1fded66a9d8bdc25bbf9d8ccd5ca/lib/antivirus/clamav/tests/scanner_test.php#L45-L56).
111111

112-
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://phpunit.de/manual/current/en/test-doubles.html).
112+
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://docs.phpunit.de/en/9.6/test-doubles.html).
113113

114114
You may also wish to include some tests of the real system to ensure that upgrades to the Antivirus software do not break your plugin.

general/development/policies/codingstyle/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1769,9 +1769,9 @@ There are some tags that are only allowed within some contexts and not globally.
17691769
- `@Given`, `@When`, `@Then`, within the [behat steps definitions](../../tools/behat/writing.md#writing-new-acceptance-test-step-definitions).
17701770
- `@covers`, `@coversDefaultClass`, `@coversNothing`, `@uses` to better control coverage within [unit tests](https://docs.moodle.org/dev/Writing_PHPUnit_tests#Generators).
17711771
- `@dataProvider` and `@testWith`, to provide example data and expectations, within [unit tests](https://docs.moodle.org/dev/Writing_PHPUnit_tests#Generators).
1772-
- `@depends`, to express dependencies between tests, where each producer returned data in passed to consumers. See [`@depends` examples](https://phpunit.readthedocs.io/en/9.5/writing-tests-for-phpunit.html#writing-tests-for-phpunit-examples-stacktest2-php) for more information.
1772+
- `@depends`, to express dependencies between tests, where each producer returned data in passed to consumers. See [`@depends` examples](https://docs.phpunit.de/en/9.6/writing-tests-for-phpunit.html#writing-tests-for-phpunit-examples-stacktest2-php) for more information.
17731773
- `@group`, for easier collecting unit tests together, following the guidelines in the [PHPUnit MoodleDocs](../../tools/phpunit.md#using-the-group-annotation).
1774-
- `@requires`, to specify unit test requirements and skip if not fulfilled. See [`@requires` usages](https://phpunit.readthedocs.io/en/9.5/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests-requires-tables-api) for more information.
1774+
- `@requires`, to specify unit test requirements and skip if not fulfilled. See [`@requires` usages](https://docs.phpunit.de/en/9.6/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests-requires-tables-api) for more information.
17751775
- `@runTestsInSeparateProcesses` and `@runInSeparateProcess`, to execute an individual test or a testcase in isolation. To be used only when strictly needed.
17761776

17771777
### Files

general/development/tools/gha.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ And that's all, pretty nice, simple and effective.
4242

4343
### How do I configure the PHPUnit executions
4444

45-
Since Moodle 3.11.8 and 4.0.2, it's possible to configure the PHPUnit executions by creating a [GitHub repository secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `phpunit_options`. Just setup its value to the options that you want to pass to PHPUnit and they will come into effect for all runs. For a list of [PHPUnit available options](https://phpunit.readthedocs.io/en/9.5/textui.html#command-line-options) use the `vendor/bin/phpunit --help` command.
45+
Since Moodle 3.11.8 and 4.0.2, it's possible to configure the PHPUnit executions by creating a [GitHub repository secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `phpunit_options`. Just setup its value to the options that you want to pass to PHPUnit and they will come into effect for all runs. For a list of [PHPUnit available options](https://docs.phpunit.de/en/9.6/textui.html#command-line-options) use the `vendor/bin/phpunit --help` command.
4646

4747
## Moodle plugins
4848

general/development/tools/phpunit.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ The following table shows what PHPUnit version is installed in which Moodle vers
5656

5757
| Moodle version | PHPUnit version | Links |
5858
| --- | --- |---------------------------------------------------------|
59-
| Moodle 3.11 - 4.0 | PHPUnit 9.5 | [Documentation](https://phpunit.readthedocs.io/en/9.5/) |
60-
| Moodle 3.10 | PHPUnit 8.5 | [Documentation](https://phpunit.readthedocs.io/en/8.5/) |
61-
| Moodle 3.7 - 3.9 | PHPUnit 7.5 | [Documentation](https://phpunit.readthedocs.io/en/7.5/) |
59+
| Moodle 3.11 - 4.0 | PHPUnit 9.5 | [Documentation](https://docs.phpunit.de/en/9.6/) |
60+
| Moodle 3.10 | PHPUnit 8.5 | [Documentation](https://docs.phpunit.de/en/8.5/) |
61+
| Moodle 3.7 - 3.9 | PHPUnit 7.5 | [Documentation](https://docs.phpunit.de/en/7.5/) |
6262
| Moodle 3.4 - 3.6 | PHPUnit 6.5 | [Documentation](https://phpunit.de/manual/6.5/en/) |
6363
| Moodle 3.2 - 3.3 | PHPUnit 5.5 | [Documentation](https://phpunit.de/manual/5.5/en/) |
6464
| Moodle 3.1 | PHPUnit 4.8.27 | [Documentation 4.8](https://phpunit.de/manual/4.8/en/) |
@@ -277,7 +277,7 @@ define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost/moodle-exttests');
277277

278278
## Writing new tests
279279

280-
- read [official PHPUnit online documentation](http://www.phpunit.de/manual/current/en/)
280+
- read [official PHPUnit online documentation](https://docs.phpunit.de/en/9.6/)
281281
- see [Writing PHPUnit tests](https://docs.moodle.org/dev/Writing_PHPUnit_tests)
282282

283283
## PHPUnit support in IDEs

versioned_docs/version-4.1/apis/plugintypes/antivirus/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ Writing unit tests is strongly encouraged as it can help to identify bugs, or ch
109109

110110
Since antivirus plugins typically rely on an external dependency, it is usually a good idea to replace the real component with a test "double". You can see an example of this in Moodle in the [antivirus_clamav unit tests](https://github.com/moodle/moodle/blob/81407f18ecff1fded66a9d8bdc25bbf9d8ccd5ca/lib/antivirus/clamav/tests/scanner_test.php#L45-L56).
111111

112-
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://phpunit.de/manual/current/en/test-doubles.html).
112+
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://docs.phpunit.de/en/9.6/test-doubles.html).
113113

114114
You may also wish to include some tests of the real system to ensure that upgrades to the Antivirus software do not break your plugin.

versioned_docs/version-4.2/apis/plugintypes/antivirus/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ Writing unit tests is strongly encouraged as it can help to identify bugs, or ch
109109

110110
Since antivirus plugins typically rely on an external dependency, it is usually a good idea to replace the real component with a test "double". You can see an example of this in Moodle in the [antivirus_clamav unit tests](https://github.com/moodle/moodle/blob/81407f18ecff1fded66a9d8bdc25bbf9d8ccd5ca/lib/antivirus/clamav/tests/scanner_test.php#L45-L56).
111111

112-
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://phpunit.de/manual/current/en/test-doubles.html).
112+
The PHPUnit Manual contains a dedicated [section on Test Doubles](https://docs.phpunit.de/en/9.6/test-doubles.html).
113113

114114
You may also wish to include some tests of the real system to ensure that upgrades to the Antivirus software do not break your plugin.

0 commit comments

Comments
 (0)