Skip to content

Update trunk tests to accommodate for new transient in core #95

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
2 tasks done
swissspidy opened this issue Apr 26, 2024 · 2 comments · Fixed by #97
Closed
2 tasks done

Update trunk tests to accommodate for new transient in core #95

swissspidy opened this issue Apr 26, 2024 · 2 comments · Fixed by #97

Comments

@swissspidy
Copy link
Member

Bug Report

Describe the current, buggy behavior

https://core.trac.wordpress.org/changeset/58025 was merged last week, which added a new transient.

That now causes some tests to fail, see https://github.com/wp-cli/cache-command/actions/runs/8845496490/job/24289764622?pr=89#step:11:88

Describe how other contributors can replicate this bug

Run Behat tests with WP_VERSION=trunk

Describe what you would expect as the correct outcome

Passing tests :)

Let us know what environment you are running this on

Any environment

Provide a possible solution

We could force-delete wp_theme_files_patterns in the tests, or add some new tests specifically targeting 6.6+, and only run the existing ones on <= 6.5. We could also modify the tests a little bit to be less strict (e.g. use "contain" vs "be")

Provide additional context/Screenshots

See link above

@petitphp
Copy link
Contributor

Will take a look at this.

@petitphp
Copy link
Contributor

@swissspidy I've pushed a fix for this issue.

Looking at the code which set the new transient, there is a way to disable the cache entirely base on the current development mode. We could use the constant WP_DEVELOPMENT_MODE during the tests to disable WP core caching mecanisms.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants