From c8c248e967eed98b52d1b5bd2746b6c70701fc70 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 9 Jan 2021 05:56:04 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/rest-api/rest-plugins-controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/rest-api/rest-plugins-controller.php b/tests/phpunit/tests/rest-api/rest-plugins-controller.php index 739f553650..bab1e87ec9 100644 --- a/tests/phpunit/tests/rest-api/rest-plugins-controller.php +++ b/tests/phpunit/tests/rest-api/rest-plugins-controller.php @@ -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(