You appear to be a bot. Output may be restricted
Description
Usage
Tests_Post::test_publish_post_with_content_filtering();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/post.php
Lines:
1 to 22 of 22
function test_publish_post_with_content_filtering() { kses_remove_filters(); $post_id = wp_insert_post( array( 'post_title' => '<script>Test</script>' ) ); $post = get_post( $post_id ); $this->assertEquals( '<script>Test</script>', $post->post_title ); $this->assertEquals( 'draft', $post->post_status ); kses_init_filters(); wp_update_post( array( 'ID' => $post->ID, 'post_status' => 'publish', ) ); $post = get_post( $post->ID ); $this->assertEquals( 'Test', $post->post_title ); kses_remove_filters(); }