[ Index ] |
PHP Cross Reference of BBPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Tests for the `bbp_*_form_forum_post_type_*()` functions. 5 * 6 * @group forums 7 * @group template 8 * @group post_type 9 */ 10 class BBP_Tests_Forums_Template_Post_Type extends BBP_UnitTestCase { 11 12 /** 13 * @covers ::bbp_forum_post_type 14 * @covers ::bbp_get_forum_post_type 15 */ 16 public function test_bbp_get_forum_post_type() { 17 $f = $this->factory->forum->create(); 18 19 $fobj = get_post_type_object( 'forum' ); 20 21 // WordPress 4.6 introduced `WP_Post_Type` class 22 if ( bbp_get_major_wp_version() < 4.6 ) { 23 $this->assertInstanceOf( 'stdClass', $fobj ); 24 } else { 25 $this->assertInstanceOf( 'WP_Post_Type', $fobj ); 26 } 27 28 $this->assertEquals( 'forum', $fobj->name ); 29 30 // Test some defaults 31 $this->assertTrue( is_post_type_hierarchical( 'forum' ) ); 32 33 $forum_type = bbp_forum_post_type( $f ); 34 $this->expectOutputString( 'forum', $forum_type ); 35 36 $forum_type = bbp_get_forum_post_type( $f ); 37 $this->assertSame( 'forum', $forum_type ); 38 } 39 40 /** 41 * @covers ::bbp_get_forum_post_type_labels 42 * @todo Implement test_bbp_get_forum_post_type_labels(). 43 */ 44 public function test_bbp_get_forum_post_type_labels() { 45 // Remove the following lines when you implement this test. 46 $this->markTestIncomplete( 47 'This test has not been implemented yet.' 48 ); 49 } 50 51 /** 52 * @covers ::bbp_get_forum_post_type_rewrite 53 * @todo Implement test_bbp_get_forum_post_type_rewrite(). 54 */ 55 public function test_bbp_get_forum_post_type_rewrite() { 56 // Remove the following lines when you implement this test. 57 $this->markTestIncomplete( 58 'This test has not been implemented yet.' 59 ); 60 } 61 62 /** 63 * @covers ::bbp_get_forum_post_type_supports 64 * @todo Implement test_bbp_get_forum_post_type_supports(). 65 */ 66 public function test_bbp_get_forum_post_type_supports() { 67 // Remove the following lines when you implement this test. 68 $this->markTestIncomplete( 69 'This test has not been implemented yet.' 70 ); 71 } 72 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sat Dec 14 01:00:50 2024 | Cross-referenced by PHPXref 0.7.1 |