factory->topic->create(); $r = $this->factory->reply->create( array( 'post_parent' => $t, 'reply_meta' => array( 'topic_id' => $t, ), ) ); $robj = get_post_type_object( 'reply' ); // WordPress 4.6 introduced `WP_Post_Type` class if ( bbp_get_major_wp_version() < 4.6 ) { $this->assertInstanceOf( 'stdClass', $robj ); } else { $this->assertInstanceOf( 'WP_Post_Type', $robj ); } $this->assertEquals( 'reply', $robj->name ); // Test some defaults $this->assertFalse( is_post_type_hierarchical( 'topic' ) ); $reply_type = bbp_reply_post_type( $r ); $this->expectOutputString( 'reply', $reply_type ); $reply_type = bbp_get_reply_post_type( $r ); $this->assertSame( 'reply', $reply_type ); } /** * @covers ::bbp_get_reply_post_type_labels * @todo Implement test_bbp_get_reply_post_type_labels(). */ public function test_bbp_get_reply_post_type_labels() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * @covers ::bbp_get_reply_post_type_rewrite * @todo Implement test_bbp_get_reply_post_type_rewrite(). */ public function test_bbp_get_reply_post_type_rewrite() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * @covers ::bbp_get_reply_post_type_supports * @todo Implement test_bbp_get_reply_post_type_supports(). */ public function test_bbp_get_reply_post_type_supports() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } }