[ Index ] |
PHP Cross Reference of BBPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Tests for the `bbp_*_form_forum_author_*()` template functions. 5 * 6 * @group forums 7 * @group template 8 * @group authors 9 */ 10 class BBP_Tests_Forums_Template_Authors extends BBP_UnitTestCase { 11 12 /** 13 * @covers ::bbp_forum_author_id 14 * @covers ::bbp_get_forum_author_id 15 */ 16 public function test_bbp_get_forum_author_id() { 17 $u = $this->factory->user->create(); 18 $f = $this->factory->forum->create( array( 19 'post_author' => $u, 20 ) ); 21 22 $forum = bbp_get_forum_author_id( $f ); 23 $this->assertSame( $u, $forum ); 24 } 25 26 /** 27 * @covers ::bbp_forum_author_display_name 28 * @covers ::bbp_get_forum_author_display_name 29 */ 30 public function test_bbp_get_forum_author_display_name() { 31 $u = $this->factory->user->create( array( 32 'display_name' => 'Barry B. Benson', 33 ) ); 34 35 $f = $this->factory->forum->create( array( 36 'post_author' => $u, 37 ) ); 38 39 $forum = bbp_get_forum_author_display_name( $f ); 40 $this->assertSame( 'Barry B. Benson', $forum ); 41 } 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sat Dec 21 01:00:52 2024 | Cross-referenced by PHPXref 0.7.1 |