[ Index ] |
PHP Cross Reference of BBPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Tests for the `bbp_*_form_forum_*_feed_link()` functions. 5 * 6 * @group forums 7 * @group template 8 * @group feeds 9 */ 10 class BBP_Tests_Forums_Template_Feeds extends BBP_UnitTestCase { 11 12 /** 13 * @covers ::bbp_forum_topics_feed_link 14 * @covers ::bbp_get_forum_topics_feed_link 15 */ 16 public function test_bbp_get_forum_topics_feed_link() { 17 18 if ( is_multisite() ) { 19 $this->markTestSkipped( 'Skipping URL tests in multiste for now.' ); 20 } 21 22 $f = $this->factory->forum->create( array( 23 'post_title' => 'Forum 1', 24 ) ); 25 26 $feed_link = bbp_get_forum_topics_feed_link( $f ); 27 $this->expectOutputString( $feed_link ); 28 bbp_forum_topics_feed_link( $f ); 29 30 $feed_link = bbp_get_forum_topics_feed_link( $f ); 31 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&forum=forum-1" class="bbp-forum-rss-link topics"><span>Topics</span></a>', $feed_link ); 32 } 33 34 /** 35 * @covers ::bbp_forum_replies_feed_link 36 * @covers ::bbp_get_forum_replies_feed_link 37 */ 38 public function test_bbp_get_forum_replies_feed_link() { 39 40 if ( is_multisite() ) { 41 $this->markTestSkipped( 'Skipping URL tests in multiste for now.' ); 42 } 43 44 $f = $this->factory->forum->create( array( 45 'post_title' => 'Forum 1', 46 ) ); 47 48 $feed_link = bbp_get_forum_replies_feed_link( $f ); 49 $this->expectOutputString( $feed_link ); 50 bbp_forum_replies_feed_link( $f ); 51 52 $feed_link = bbp_get_forum_replies_feed_link( $f ); 53 $this->assertSame( '<a href="http://' . WP_TESTS_DOMAIN . '/?type=reply&feed=rss2&forum=forum-1" class="bbp-forum-rss-link replies"><span>Replies</span></a>', $feed_link ); 54 } 55 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Oct 9 01:00:53 2024 | Cross-referenced by PHPXref 0.7.1 |