-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Tests: Improve code coverage for _build_block_template_result_from_file
#5396
Conversation
_build_block_template_result_from_file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a minor note about test method names, but nothing blocking.
Thank you! LGTM 😊
Thank you for the feedback. I’ll rename and move test cases as suggested and land tomorrow 👍 |
83919a5
to
c656135
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @gziolo! This looks good to me!
Coverage shows the hooked_blocks()
lines aren't covered by these tests.
It would be good to cover these two conditions so there's a complete set of tests in this function's test class. Even if covered by tests for another function, having tests here means that if these tests pass and the other function's fail, we know to look in the other function right away.
That said, the final coverage doesn't need to be done in this PR and could be a follow-up if you'd like.
Approving 🙂
Do I understand correctly that you mean adding coverage in the same test suite? I'm sure it has coverage in other places, but I agree we can add another test here 👍🏻 I want to wait until #5455 as I will have to rebase this branch and probably remove one or two tests, maybe move some new tests. I can work on the feedback as part of that. |
f0250e3
to
fecdb3b
Compare
Committed with https://core.trac.wordpress.org/changeset/56983.
I will work on more tests separately covering the filter |
Trac ticket: https://core.trac.wordpress.org/ticket/59325
Follow-up to the comment from @costdev in #5186 (comment):
All cases listed should be covered with this PR.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.