Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions tests/phpunit/tests/multisite/updateBlogStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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",
Expand Down
Loading