diff --git a/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php b/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php index c424d7f582..610cafb169 100644 --- a/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php +++ b/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php @@ -152,6 +152,9 @@ class Tests_Ajax_wpAjaxUpdateTheme extends WP_Ajax_UnitTestCase { $_POST['_ajax_nonce'] = wp_create_nonce( 'updates' ); $_POST['slug'] = 'camelCase'; + // Prevent wp_update_themes() from running. + wp_installing( true ); + // Make the request. try { $this->_handleAjax( 'update-theme' ); @@ -159,6 +162,8 @@ class Tests_Ajax_wpAjaxUpdateTheme extends WP_Ajax_UnitTestCase { unset( $e ); } + wp_installing( false ); + // Get the response. $response = json_decode( $this->_last_response, true );