Changeset 6330 for trunk/tests/phpunit/testcases/topics/functions/topic.php
- Timestamp:
- 02/26/2017 11:12:37 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/topics/functions/topic.php
r6036 r6330 15 15 */ 16 16 public function test_bbp_insert_topic() { 17 17 $u = $this->factory->user->create_many( 2 ); 18 18 $f = $this->factory->forum->create(); 19 19 … … 22 22 23 23 $t = $this->factory->topic->create( array( 24 'post_title' => 'Topic 1',24 'post_title' => 'Topic 1', 25 25 'post_content' => 'Content for Topic 1', 26 'post_parent' => $f, 27 'post_date' => $post_date, 28 'topic_meta' => array( 26 'post_parent' => $f, 27 'post_date' => $post_date, 28 'post_author' => $u[0], 29 'topic_meta' => array( 29 30 'forum_id' => $f, 30 31 ), … … 33 34 $r = $this->factory->reply->create( array( 34 35 'post_parent' => $t, 35 'post_date' => $post_date, 36 'reply_meta' => array( 36 'post_date' => $post_date, 37 'post_author' => $u[1], 38 'reply_meta' => array( 37 39 'forum_id' => $f, 38 40 'topic_id' => $t, … … 54 56 // Topic meta. 55 57 $this->assertSame( $f, bbp_get_topic_forum_id( $t ) ); 56 $this->assertSame( 1, bbp_get_topic_reply_count( $t, true ) );57 $this->assertSame( 0, bbp_get_topic_reply_count_hidden( $t, true ) );58 $this->assertSame( 1,bbp_get_topic_voice_count( $t, true ) );58 $this->assertSame( 1, bbp_get_topic_reply_count( $t, true ) ); 59 $this->assertSame( 0, bbp_get_topic_reply_count_hidden( $t, true ) ); 60 $this->assertSame( 2, bbp_get_topic_voice_count( $t, true ) ); 59 61 $this->assertSame( $r, bbp_get_topic_last_reply_id( $t ) ); 60 62 $this->assertSame( $r, bbp_get_topic_last_active_id( $t ) );
Note: See TracChangeset
for help on using the changeset viewer.