Tests: Set up the plugin download in multisite plugin tests to come locally.

This brings consistency between single site and multisite in REST API plugin installation tests.

Previously, multisite tests were unnecessarily downloading the plugin from WordPress.org on each test run, causing external HTTP requests and leading to failures in case of a timeout.

Follow-up to [48242], [49491], [49913].

See #51669.

git-svn-id: https://develop.svn.wordpress.org/trunk@49951 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-01-09 05:56:04 +00:00
parent 8de262e8f8
commit c8c248e967

View File

@@ -443,6 +443,7 @@ class WP_REST_Plugins_Controller_Test extends WP_Test_REST_Controller_Testcase {
}
wp_set_current_user( self::$super_admin );
$this->setup_plugin_download();
$request = new WP_REST_Request( 'POST', self::BASE );
$request->set_body_params(
@@ -466,6 +467,7 @@ class WP_REST_Plugins_Controller_Test extends WP_Test_REST_Controller_Testcase {
}
wp_set_current_user( self::$super_admin );
$this->setup_plugin_download();
$request = new WP_REST_Request( 'POST', self::BASE );
$request->set_body_params(