*/ ?> <?php do_action('bbp_template_before_user_topics_created'); ?> <div id="bbp-user-topics-started" class="bbp-user-topics-started"> <h2 class="entry-title"><?php esc_html_e('Forum Topics Started', 'monsoon'); ?> </h2> <div class="bbp-user-section"> <?php if (bbp_get_user_topics_started()) { ?> <?php bbp_get_template_part('pagination', 'topics'); ?> <?php bbp_get_template_part('loop', 'topics'); ?> <?php bbp_get_template_part('pagination', 'topics'); ?> <?php
/** * @covers ::bbp_get_user_topics_started */ public function test_bbp_get_user_topics_started() { $u = $this->factory->user->create(); $has_topics = bbp_get_user_topics_started($u); $this->assertFalse($has_topics); $t = $this->factory->topic->create_many(3, array('post_author' => $u)); bbp_update_topic(array('topic_id' => $t)); $has_topics = bbp_get_user_topics_started($u); $this->assertTrue($has_topics); }