diff --git a/tests/phpunit/tests/multisite/updateBlogStatus.php b/tests/phpunit/tests/multisite/updateBlogStatus.php index 20cd90307fd34..77a62a2b5bb18 100644 --- a/tests/phpunit/tests/multisite/updateBlogStatus.php +++ b/tests/phpunit/tests/multisite/updateBlogStatus.php @@ -46,9 +46,6 @@ public function test_update_blog_status_make_ham_blog_action() { $this->assertSame( 1, $test_action_counter->get_call_count() ); } - /** - * @group external-http - */ public function test_content_from_spam_blog_is_not_available() { $spam_blog_id = self::factory()->blog->create(); switch_to_blog( $spam_blog_id ); @@ -67,6 +64,22 @@ public function test_content_from_spam_blog_is_not_available() { update_blog_status( $spam_blog_id, 'spam', 1 ); + add_filter( + 'pre_http_request', + static function () { + return array( + 'headers' => array(), + 'body' => '', + 'response' => array( + 'code' => 404, + 'message' => 'Not Found', + ), + 'cookies' => array(), + 'filename' => null, + ); + } + ); + $post_id = self::factory()->post->create( array( 'post_content' => "\n $spam_permalink \n",