Conversation
|
Updated this branch with current trunk and fixed the PHPCS assignment-alignment warning in wpTimezoneChoice.php. Validation: targeted PHPCS passes. The focused PHPUnit file could not run because the local test configuration file is not present. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
579de47 to
d46ce5d
Compare
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
sirreal
left a comment
There was a problem hiding this comment.
I'm not happy with this approach as it is now. The cleanup should cleanup, and tests shouldn't need to set a flag to trigger cleanup behavior.
Drop the `$restore_timezone_translations` property. `tear_down()` now resynchronizes `wp_timezone_choice()`'s locale static after every test, so no test has to opt in to its own cleanup. The resync runs before `parent::tear_down()`, which restores the hook snapshot and so undoes the `load_textdomain` and `gettext` calls the resync fires. In `Tests_Functions_ForceSslAdmin`, capture the `force_ssl_admin()` value in `set_up()` and restore it in `tear_down()` instead of writing a hard-coded `false`, following `tests/phpunit/tests/url.php`.
|
@sirreal this seems to be working well now. I ran all the individual tests isolated in both classes, together in both, and the |
|
I've cleaned up some changes I wasn't happy with and now I'm satisfied. Ready for review and merge. @mindctrl I did change some things since your testing if you'd care to re-run. Thanks for the feedback so far! |
Reset forced admin SSL to its configured startup value after each test. Resynchronize timezone translations with the restored locale after each timezone-choice test, preventing function-static state from leaking between tests. Developed in: #13182 Props jonsurrell, mindctrl. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@63640 602fd350-edb4-49c9-b593-d223f7449a82
Reset forced admin SSL to its configured startup value after each test. Resynchronize timezone translations with the restored locale after each timezone-choice test, preventing function-static state from leaking between tests. Developed in: WordPress/wordpress-develop#13182 Props jonsurrell, mindctrl. See #65893. Built from https://develop.svn.wordpress.org/trunk@63640 git-svn-id: http://core.svn.wordpress.org/trunk@62815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Summary
Verification
git diff --checkpassed.Trac: https://core.trac.wordpress.org/ticket/65893