WordPress.org

Make WordPress Core

Changeset 961 in tests


Ignore:
Timestamp:
08/11/2012 03:07:36 AM (6 years ago)
Author:
scribu
Message:

test if the post is actually filtered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/post/objects.php

    r942 r961  
    2121
    2222    function test_get_post_filter() {
    23         $post = get_post( $this->factory->post->create() );
     23        $post = get_post( $this->factory->post->create( array(
     24            'post_title' => "Mary's home"
     25        ) ) );
    2426
    2527        $this->assertEquals( 'raw', $post->filter );
     28        $this->assertInternalType( 'int', $post->post_parent );
    2629
    27         $display_post = get_post( $post, OBJECT, 'display' );
    28         $this->assertEquals( 'display', $display_post->filter );
     30        $display_post = get_post( $post, OBJECT, 'js' );
     31        $this->assertEquals( 'js', $display_post->filter );
     32        $this->assertEquals( esc_js( "Mary's home" ), $display_post->post_title );
    2933    }
    3034
Note: See TracChangeset for help on using the changeset viewer.