3.0.x php unit testing fixes pre rfc - #38
Merged
Merged
Conversation
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
tyrsson
requested changes
Mar 29, 2025
Member
There was a problem hiding this comment.
Overall looks very good. (I know you were just fixing what was already there)
For all of the test cases they need renamed to SomeTestCase and if test do not extend them they need to be marked as final.
All test methods that are not returning values need typed as :void. I'm requesting this change here since we are already touching all of these files and it will improve the psalm baseline a lot.
I would also like to get @settermjd thoughts on this review. It's a lot to review so maybe he can just provide some feedback on this one.
@simon-mundy Thank you for the huge amount of work in this PR.
tyrsson
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
reviewed
Mar 30, 2025
settermjd
requested changes
Mar 30, 2025
settermjd
left a comment
Collaborator
There was a problem hiding this comment.
Just a few comments, mate Otherwise, thanks for the hard work.
tyrsson
reviewed
Mar 31, 2025
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
Fixed datasources to ensure they are static Various refactoring to tests for compliance Made E_NOTICE/E_ERROR silent for testing purposes Commented out incomplete tests
This was
linked to
issues
Apr 14, 2025
Closed
Closed
This file contains hidden or 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
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.
Upgraded tests using rector -> PHPUnit 11
Fixed datasources to ensure they are static
Various refactoring to tests for compliance
Made E_NOTICE/E_ERROR silent for testing purposes
Commented out incomplete tests
For all intents and purposes this means the unit testing should work as-is. There are still numerous upgrades to perform - namely a lot of deprecated getMockForAbstractClass() calls in the tests - but they will need to wait until the satellite packages have been moved out as it's a lot of work.