Changeset 49396 for branches/5.0/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 10/29/2020 06:50:55 PM (5 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/multisite/site.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/5.0/tests/phpunit/tests/multisite/site.php
r41883 r49396 444 444 445 445 remove_action( 'make_ham_blog', array( $this, '_action_counter_cb' ), 10 ); 446 } 447 448 function test_content_from_spam_blog_is_not_available() { 449 $spam_blog_id = self::factory()->blog->create(); 450 switch_to_blog( $spam_blog_id ); 451 $post_data = array( 452 'post_title' => 'Hello World!', 453 'post_content' => 'Hello world content', 454 ); 455 $post_id = self::factory()->post->create( $post_data ); 456 $post = get_post( $post_id ); 457 $spam_permalink = site_url() . '/?p=' . $post->ID; 458 $spam_embed_url = get_post_embed_url( $post_id ); 459 460 restore_current_blog(); 461 $this->assertNotEmpty( $spam_permalink ); 462 $this->assertEquals( $post_data['post_title'], $post->post_title ); 463 464 update_blog_status( $spam_blog_id, 'spam', 1 ); 465 466 $post_id = self::factory()->post->create( 467 array( 468 'post_content' => "\n $spam_permalink \n", 469 ) 470 ); 471 $post = get_post( $post_id ); 472 $content = apply_filters( 'the_content', $post->post_content ); 473 474 $this->assertNotContains( $post_data['post_title'], $content ); 475 $this->assertNotContains( "src=\"{$spam_embed_url}#?", $content ); 446 476 } 447 477
Note: See TracChangeset
for help on using the changeset viewer.