-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 Compatibility Layer #11
Merged
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
A lot of files are identical throughout the different packages. This is the base for unifying them for easier handling.
The images used for tests with these versions have problems with using composer (giving curl error 60), so they are removed for now, until a solution is found.
Used for signing the generated .drone.yml file Generate .drone.yml
There's a bug in the lowest possible version of phpunit/phpunit-mock-objects. Therefore, that dependency gets updated separately.
The public API contains methods being named _ (e.g., joomla/language) Some libraries and APIs use snake case names, causing code style checker to complain.
As some packages irreversibly violate our code style by using underscores in variable and method names, the loose check will let names with underscore pass. This check must pass. The strict check is applied without any exceptions, but allowed to fail, so we still get informed about these violations.
Joomla.NamingConventions.ValidVariableName.NotCamelCaps was still checked.
Since the CMS has expressed a need for PHP 8.1 compatible versions of the packages from Framework 1, compatibility should also be tested.
PHPUnit 6.5 fails on PHP 8.1
This reverts commit 27ee84f71de1431043e7248a388c0989042b8b29.
Remove 'ignore-deps' directive from PHP 8 pipelines This is an attempt to find the cause for tests not even being executed under certain, yet unknown, circumstances.
The phpunit.xml should only specify values that are required by the test environment. Everything that the tests themselves require should be made available via bootstrap.php.
Derive your tests from \Joomla\Test\TestCase instead of \PHPUnit\Framework\TestCase to avoid problems with the signature change in PHPUnit 7.0.
Composer will use PHPUnit 4.8.36 otherwise.
It is suggested, no (test) code is relying on it being present.
Add a paragraph about the purpose and usage of Joomla\Test\TestCase.
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.
Summary of Changes
Add an alternative TestCase class that hides the issues with incompatible signatures for PHPUnit < 7.0 and PHPUnit >= 7.0.
Testing Instructions
Take an existing test class working with PHPUnit < 7.0, extend it from Joomla\Test\TestCase instead of PHPUnit\Framework\TestCase.
Run the test with PHPUnit >= 7.0.
PHP should not complain about incompatible signatures.
Documentation Changes Required
README was updated accordingly.