Skip to content

3.0.x php unit testing fixes pre rfc #38

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

Merged
merged 19 commits into from
Apr 14, 2025

Conversation

simon-mundy
Copy link
Collaborator

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.

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
@simon-mundy simon-mundy added the qa Improvements in quality assurance of the project label Mar 28, 2025
@simon-mundy simon-mundy added this to the 3.0.0 milestone Mar 28, 2025
@simon-mundy simon-mundy self-assigned this Mar 28, 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
Copy link
Member

@tyrsson tyrsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in @laminas-db Mar 29, 2025
Copy link
Collaborator

@settermjd settermjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments, mate Otherwise, thanks for the hard work.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa Improvements in quality assurance of the project
Projects
None yet
3 participants