Tests: Correctly restore the wp_installing() status in Ajax tests.

In the tests for updating a plugin or theme via Ajax, `wp_installing( true )` was called to prevent `wp_update_plugins()` or `wp_update_themes()` from running.

Since the subsequent `wp_installing( false )` call was in the same `try { ... }` block, it could not be executed if an exception was thrown, affecting other tests.

In this case, after rearranging the Ajax tests in [54722], this started affecting the `get_site_option()` calls in the tests for `wp_ajax_wp_compression_test()`.

By moving both `wp_installing()` calls out of the `try`/`catch` block, we can ensure the status is correctly restored.

Follow-up to [734/tests], [37150], [38168], [38710], [54722].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54723


git-svn-id: http://core.svn.wordpress.org/trunk@54275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-10-30 02:54:11 +00:00
parent 7b71916b53
commit 9e04245227

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-54722';
$wp_version = '6.2-alpha-54723';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.