-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Background Block Support: Fix unit test HTML escaping after core change #72233
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Ok, I'm not sure what's going on here. The tests are failing in #72231 with one output and were failing here with a different output. Not sure if it's possible that the WordPress versions in CI are different? |
This reverts commit f9274af.
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.
I was just looking at this and saw you beat me to it, thanks!
The job failing seems to test previous WP version, so maybe we need to have a fallback in the tests?
I'd expect us to have encountered this before and will try to search a bit.
|
Thanks Nik, feel free to push commits if you can figure it out. I left a message in slack here as well - https://wordpress.slack.com/archives/C02QB2JS7/p1760082325105039. I'm considering skipping the tests for now. |
|
Does this have assertEqualHTML from Core available? That would make it resilient to this kind of change. |
|
Lets try it! I haven't been able to run the tests locally since updating wp-env, so I'll push and hope 🤞 |
|
@talldan do you want me to wait for your CI results before pushing the change to check WP version? |
|
It failed with a message saying it couldn't create a parser. @ntsekouras Which WP version code are you referring to? I guess you can push the change, I don't have any better ideas. |
|
I opened a new PR to test my changes without interfering with your CI. |
|
It doesn't seem to have worked unfortunately, the tests fail with the opposite of whatever the expected output is 🤔 |
I pushed another try. |
|
Ah, I see what you mean now, there are 'WP previous major version' jobs on CI. Failures and your fix makes sense now, I'll close this in favor of your PR. |
Still doesn't work though :). I'll try some more approaches - maybe check for a function that was introduced in 6.9.. |
|
I think assertEqualHTML would have worked but the arguments were wrong. The test commit needed to add |
What?
A core change (WordPress/wordpress-develop#10143) seems to have resulted in some PHP unit tests failing. This PR updates the tests in a similar way to the changes in the core PR. (I think the tests might actually be identical)