Changeset 5773
- Timestamp:
- 05/19/2015 01:20:09 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/update.php
r5713 r5773 75 75 76 76 /** 77 * @group canonical 77 78 * @covers ::bbp_create_initial_content 78 79 */ … … 83 84 $topic_id = 4; 84 85 $reply_id = 5; 86 $now = 'right now'; 85 87 88 // Forum post 86 89 $this->assertSame( 'General', bbp_get_forum_title( $forum_id ) ); 87 90 $this->assertSame( 'General chit-chat', bbp_get_forum_content( $forum_id ) ); 88 91 $this->assertSame( 'open', bbp_get_forum_status( $forum_id ) ); 89 92 $this->assertTrue( bbp_is_forum_public( $forum_id ) ); 93 $this->assertSame( 0, bbp_get_forum_parent_id( $forum_id ) ); 90 94 95 // Topic post 91 96 $this->assertSame( $forum_id, bbp_get_topic_forum_id( $topic_id ) ); 92 97 $this->assertSame( 'Hello World!', bbp_get_topic_title( $topic_id ) ); … … 97 102 $this->assertTrue( bbp_is_topic_published( $topic_id ) ); 98 103 104 // Reply post 99 105 $this->assertSame( $forum_id, bbp_get_reply_forum_id( $reply_id ) ); 100 106 $this->assertSame( 'Reply To: Hello World!', bbp_get_reply_title( $reply_id ) ); … … 105 111 $this->assertSame( 'publish', bbp_get_reply_status( $reply_id ) ); 106 112 $this->assertTrue( bbp_is_reply_published( $reply_id ) ); 113 114 // Forum meta 115 $this->assertSame( 0, bbp_get_forum_subforum_count( $forum_id, true ) ); 116 $this->assertSame( 1, bbp_get_forum_topic_count( $forum_id, false, true ) ); 117 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $forum_id, true ) ); 118 $this->assertSame( 1, bbp_get_forum_reply_count( $forum_id, false, true ) ); 119 $this->assertSame( 1, bbp_get_forum_topic_count( $forum_id, true, true ) ); 120 $this->assertSame( 1, bbp_get_forum_reply_count( $forum_id, true, true ) ); 121 $this->assertSame( 2, bbp_get_forum_post_count( $forum_id, false, true ) ); 122 $this->assertSame( 2, bbp_get_forum_post_count( $forum_id, true, true ) ); 123 $this->assertSame( $topic_id, bbp_get_forum_last_topic_id( $forum_id ) ); 124 $this->assertSame( 'Hello World!', bbp_get_forum_last_topic_title( $forum_id ) ); 125 $this->assertSame( $reply_id, bbp_get_forum_last_reply_id( $forum_id ) ); 126 $this->assertSame( 'Reply To: Hello World!', bbp_get_forum_last_reply_title( $forum_id ) ); 127 $this->assertSame( $reply_id, bbp_get_forum_last_active_id( $forum_id ) ); 128 $this->assertSame( $now, bbp_get_forum_last_active_time( $forum_id ) ); 129 130 // Topic meta 131 $this->assertSame( '0.0.0.0', bbp_current_author_ip( $topic_id ) ); 132 $this->assertSame( $forum_id, bbp_get_topic_forum_id( $topic_id ) ); 133 $this->assertSame( 1, bbp_get_topic_voice_count( $topic_id, true ) ); 134 $this->assertSame( 1, bbp_get_topic_reply_count( $topic_id, true ) ); 135 $this->assertSame( 0, bbp_get_topic_reply_count_hidden( $topic_id, true ) ); 136 $this->assertSame( $reply_id, bbp_get_topic_last_reply_id( $topic_id ) ); 137 $this->assertSame( $reply_id, bbp_get_topic_last_active_id( $topic_id ) ); 138 $this->assertSame( $now, bbp_get_topic_last_active_time( $topic_id ) ); 139 140 // Reply Meta 141 $this->assertSame( '0.0.0.0', bbp_current_author_ip( $reply_id ) ); 142 $this->assertSame( $forum_id, bbp_get_reply_forum_id( $reply_id ) ); 143 $this->assertSame( $topic_id, bbp_get_reply_topic_id( $reply_id ) ); 107 144 } 108 145
Note: See TracChangeset
for help on using the changeset viewer.