From 94d8286dd8f01ce20d2cd725931bca0d8ed6b676 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Tue, 12 Sep 2023 23:32:27 +0300 Subject: [PATCH] test: do not perform external requests in WPCOM_VIP_Utils_Vip_Is_Jetpack_Request_Test (#4792) --- .../test-vip-utils-vip-is-jetpack-request.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/vip-helpers/vip-utils/test-vip-utils-vip-is-jetpack-request.php b/tests/vip-helpers/vip-utils/test-vip-utils-vip-is-jetpack-request.php index 2b5a4d3cc6..3b1f925755 100644 --- a/tests/vip-helpers/vip-utils/test-vip-utils-vip-is-jetpack-request.php +++ b/tests/vip-helpers/vip-utils/test-vip-utils-vip-is-jetpack-request.php @@ -1,6 +1,27 @@ [], + 'body' => '["122.248.245.244\/32","54.217.201.243\/32","54.232.116.4\/32","192.0.80.0\/20","192.0.96.0\/20","192.0.112.0\/20","195.234.108.0\/22"]', + 'response' => [ + 'code' => 200, + 'message' => 'OK', + ], + 'cookies' => [], + ]; + } + + return $response; + }, 10, 3 ); + } public function test__vip_is_jetpack_request__shortcut() { //phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__HTTP_USER_AGENT__