New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPUnit 8 fixes #3406
Merged
Merged
PHPUnit 8 fixes #3406
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add comment to regroup editor/IDE and temp files - Move config-related excludes together with other DokuWiki ones
The following files should not be checked in: - phpunit.phar: per documentation [1], it is PHP version-specific - PHPUnit's cache file - data files generated during tests execution [1]: https://www.dokuwiki.org/devel:unittesting
$INPUT is set to 'test2', but the $_POST checks for 'test'.
There are actually 2 distinct test cases of invalid methods: 1. Not following the definition in Api class's PHPDoc block - core methods begin by a 'dokuwiki' or 'wiki' followed by a . and the method name itself. - plugin methods are formed like 'plugin.<plugin name>.<method name>' 2. Method "type" does not begin with 'dokuwiki', 'wiki' or 'plugin' A new check was added so both are now covered. Test was modified to make use of PHPUnit expectException() method, instead of relying on a try/catch block.
This error only occurs when PHPUnit runs both the `testScripts` and the `test_Validity` suites [1], because all tests are running in the same PHP process. Adding an `if(!defined` check to avoid the problem. [1]: ./phpunit.phar --filter 'testScripts|test_Validity'
Before
After
|
Awesome! Looks good except for the thing the Scrutinizer Inspections found in HTTPClient, something is wrong with the order in which |
The variable ``$port`` seems only to be defined at a later point. As such the call to ``isset()`` seems to always evaluate to ``false``.
Fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing most of the PHPUnit errors on PHP8 in PR #3404