Changeset 49391 for branches/5.4/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 10/29/2020 06:39:14 PM (4 years ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/5.4/tests/phpunit/tests/multisite/site.php
r47318 r49391 489 489 } 490 490 491 function test_content_from_spam_blog_is_not_available() { 492 $spam_blog_id = self::factory()->blog->create(); 493 switch_to_blog( $spam_blog_id ); 494 $post_data = array( 495 'post_title' => 'Hello World!', 496 'post_content' => 'Hello world content', 497 ); 498 $post_id = self::factory()->post->create( $post_data ); 499 $post = get_post( $post_id ); 500 $spam_permalink = site_url() . '/?p=' . $post->ID; 501 $spam_embed_url = get_post_embed_url( $post_id ); 502 503 restore_current_blog(); 504 $this->assertNotEmpty( $spam_permalink ); 505 $this->assertEquals( $post_data['post_title'], $post->post_title ); 506 507 update_blog_status( $spam_blog_id, 'spam', 1 ); 508 509 $post_id = self::factory()->post->create( 510 array( 511 'post_content' => "\n $spam_permalink \n", 512 ) 513 ); 514 $post = get_post( $post_id ); 515 $content = apply_filters( 'the_content', $post->post_content ); 516 517 $this->assertNotContains( $post_data['post_title'], $content ); 518 $this->assertNotContains( "src=\"{$spam_embed_url}#?", $content ); 519 } 520 491 521 function test_update_blog_status_make_spam_blog_action() { 492 522 global $test_action_counter;
Note: See TracChangeset
for help on using the changeset viewer.