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

PHP Unit Tests are failing #37116

Closed
ockham opened this issue Dec 3, 2021 · 3 comments
Closed

PHP Unit Tests are failing #37116

ockham opened this issue Dec 3, 2021 · 3 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@ockham
Copy link
Contributor

ockham commented Dec 3, 2021

Description

Copied (with edits) from #37100 (comment):

[T]he remaining PHP unit test that's failing [is]

1) WP_REST_URL_Details_Controller_Test::test_will_return_from_cache_if_populated
Failed asserting that 'Example Website — - with encoded content.' contains "This value from cache".

/var/www/html/wp-content/plugins/gutenberg/phpunit/class-wp-rest-url-details-controller-test.php:302

is probably due to WordPress/wordpress-develop@1270c89 (committed today at 11:34 UTC): I noticed it wasn't present on trunk for https://github.com/WordPress/gutenberg/runs/4407241926?check_suite_focus=true (at 11:15 UTC) but for the following merge https://github.com/WordPress/gutenberg/runs/4408138725?check_suite_focus=true (at 12:51 UTC), and it touches src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php which seems relevant to the error 😬

Step-by-step reproduction instructions

Look at PHP unit tests for any recent commit, or run test-unit-php locally.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@ockham ockham added the [Type] Bug An existing feature does not function as intended label Dec 3, 2021
@ramonjd
Copy link
Member

ramonjd commented Dec 4, 2021

For fun, I updated the filters to reflect the change in WordPress/wordpress-develop@1270c89

Screen Shot 2021-12-04 at 2 57 03 pm

😱

@ramonjd
Copy link
Member

ramonjd commented Dec 4, 2021

Does that mean we'd have to update https://github.com/WordPress/gutenberg/blob/36746203fb97e715d709adbc9e9ff71037a42f14/lib/class-wp-rest-url-details-controller.php with the same changes as https://core.trac.wordpress.org/changeset/52311?

I have no context about why Gutenberg has it's own WP_REST_URL_Details_Controller class.

@ockham
Copy link
Contributor Author

ockham commented Dec 6, 2021

Fixed by #37122. Thanks @ramonjd!

@ockham ockham closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants