Skip to content
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

Fixing risky tests #1371

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Fixing risky tests #1371

merged 2 commits into from
Jan 17, 2025

Conversation

JimTools
Copy link
Contributor

Making tests that have no assertions with the annotation to suppress phpunits warning around risky tests

closes #1370

Makring tests that have no assertions with the annotation to suppress
phpunits warning around risky tests

closes 1370
@JimTools
Copy link
Contributor Author

To be honest I don't think a lot of these tests bring value, for the most part, they just test the constructor works can get a new instance.

@makasim
Copy link
Member

makasim commented Jan 12, 2025

It seemed like a good idea at the time of writing (6-8 years ago). Now, I agree with you that such tests bring no value. If you want you can remove them.

To be honest I don't think a lot of these tests bring value, for the most part, they just test the constructor works can get a new instance.

@JimTools
Copy link
Contributor Author

I’ll work on updating this to remove tests that have little to no value.

As for the CS and static analysis I’ll raise another PR to fix this.

Removing all tests that creates a new instance but doesn't call any
methods nor preform any assertions.
@JimTools
Copy link
Contributor Author

Fixed CS issues in #1372

@JimTools
Copy link
Contributor Author

Fixes for static analysis are in #1373, it's best if this gets merged after the cs fixes.

@makasim how would you like to handle the 3 PR's? I plan to create more fixing deprecations and warnings in the tests. and possibly upgrade PHPUnit to 10.x

@makasim
Copy link
Member

makasim commented Jan 17, 2025

I don't really want to keep master red, but considering you plan to address all issues eventually as separate MRs I am fine with it.

@makasim makasim merged commit 4dbdbb5 into php-enqueue:master Jan 17, 2025
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix risky unit tests
2 participants