Changeset 49394 for branches/5.2/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 10/29/2020 06:44:12 PM (4 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/5.2/tests/phpunit/tests/multisite/site.php
r47320 r49394 475 475 } 476 476 477 function test_content_from_spam_blog_is_not_available() { 478 $spam_blog_id = self::factory()->blog->create(); 479 switch_to_blog( $spam_blog_id ); 480 $post_data = array( 481 'post_title' => 'Hello World!', 482 'post_content' => 'Hello world content', 483 ); 484 $post_id = self::factory()->post->create( $post_data ); 485 $post = get_post( $post_id ); 486 $spam_permalink = site_url() . '/?p=' . $post->ID; 487 $spam_embed_url = get_post_embed_url( $post_id ); 488 489 restore_current_blog(); 490 $this->assertNotEmpty( $spam_permalink ); 491 $this->assertEquals( $post_data['post_title'], $post->post_title ); 492 493 update_blog_status( $spam_blog_id, 'spam', 1 ); 494 495 $post_id = self::factory()->post->create( 496 array( 497 'post_content' => "\n $spam_permalink \n", 498 ) 499 ); 500 $post = get_post( $post_id ); 501 $content = apply_filters( 'the_content', $post->post_content ); 502 503 $this->assertNotContains( $post_data['post_title'], $content ); 504 $this->assertNotContains( "src=\"{$spam_embed_url}#?", $content ); 505 } 506 477 507 function test_update_blog_status_make_spam_blog_action() { 478 508 global $test_action_counter;
Note: See TracChangeset
for help on using the changeset viewer.