Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixing risky tests #1371

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
makasim merged 2 commits into php-enqueue:master from JimTools:bugfix/risky-tests
Jan 17, 2025
Merged

Fixing risky tests #1371

makasim merged 2 commits into php-enqueue:master from JimTools:bugfix/risky-tests
Jan 17, 2025

Conversation

Copy link
Contributor

@JimTools JimTools commented Jan 11, 2025

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
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.

Copy link
Member

makasim commented Jan 12, 2025
edited
Loading

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.

Steveb-p reacted with thumbs up emoji

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.

makasim reacted with thumbs up emoji

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

Fixed CS issues in #1372

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

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.

JimTools reacted with heart emoji

@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
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Fix risky unit tests
2 participants

AltStyle によって変換されたページ (->オリジナル) /