Make WordPress Core

Ticket #21309: post-to-edit.tests.diff

File post-to-edit.tests.diff, 681 bytes (added by scribu, 13 years ago)
  • tests/post/objects.php

     
    113113                $this->assertInternalType( 'array', $post['ancestors'] );
    114114                $this->assertEquals( 'raw', $post['filter'] );
    115115        }
     116
     117        function test_get_post_to_edit() {
     118                $post = get_post( $this->factory->post->create( array( 'post_type' => 'page' ) ) );
     119
     120                $post = get_post( $post, OBJECT, 'edit' );
     121
     122                $this->assertTrue( isset( $post->page_template ) );
     123
     124                $this->assertInternalType( 'array', $post->post_category );
     125                $this->assertInternalType( 'array', $post->tags_input );
     126        }
    116127}