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

Fix failing PHPUnit tests #45265

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Fix failing PHPUnit tests #45265

merged 2 commits into from
Oct 25, 2022

Conversation

Mamaduka
Copy link
Member

What?

Resolves #45254.

PR tries to fix failing PHPUnit tests.

How?

I've added a check to avoid calling the gutenberg_resolve_assets for WP 6.0 and above. The __unstableResolvedAssets will be generated using _wp_get_iframed_editor_assets for those versions.

Testing Instructions

CI should be green.

Locally: npm run test:unit:php -- --filter WP_Navigation_Page_Test

@Mamaduka Mamaduka requested a review from ockham October 25, 2022 07:00
@Mamaduka Mamaduka self-assigned this Oct 25, 2022
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Oct 25, 2022
@ockham
Copy link
Contributor

ockham commented Oct 25, 2022

Thanks @Mamaduka, looks like a great solution (that didn't occur to me). I'll quickly test locally to verify that it really falls back to _wp_get_iframed_editor_assets 😄

Co-authored-by: Bernie Reiter <ockham@raz.or.at>
@Mamaduka
Copy link
Member Author

@ockham, I got inspiration from your comment for this fix 😄

Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for fixing 😊

@ockham ockham added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 25, 2022
@ockham
Copy link
Contributor

ockham commented Oct 25, 2022

@priethor @juanmaguitar This should also be included in GB 14.4 please 😊

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Thank you @Mamaduka 😍

@ockham ockham merged commit 3aa92a4 into trunk Oct 25, 2022
@ockham ockham deleted the fix/failing-phpunit-tests branch October 25, 2022 09:50
@github-actions github-actions bot added this to the Gutenberg 14.5 milestone Oct 25, 2022
@ockham
Copy link
Contributor

ockham commented Oct 25, 2022

I just cherry-picked this PR to the wp/6.1 branch to get it included in the next release: 739b2b0

ockham added a commit that referenced this pull request Oct 25, 2022
Co-authored-by: Bernie Reiter <ockham@raz.or.at>
@ockham ockham removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 25, 2022
ockham added a commit that referenced this pull request Oct 25, 2022
Co-authored-by: Bernie Reiter <ockham@raz.or.at>
@ockham
Copy link
Contributor

ockham commented Oct 25, 2022

Cherry-picked to the release/14.4 branch in e4b2cd2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP unit tests are failing
3 participants