Changeset 5844
- Timestamp:
- 07/15/2015 09:27:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/forums/template/get-last-thing.php
r5786 r5844 74 74 $this->assertSame( $now, $last_time ); 75 75 76 $ r = $this->factory->reply->create( array(76 $this->factory->reply->create( array( 77 77 'post_parent' => $t, 78 78 'reply_meta' => array( … … 130 130 ) ); 131 131 132 $ r = $this->factory->reply->create( array(132 $this->factory->reply->create( array( 133 133 'post_parent' => $t, 134 134 'reply_meta' => array( … … 172 172 ) ); 173 173 174 $ r = $this->factory->reply->create( array(174 $this->factory->reply->create( array( 175 175 'post_parent' => $t, 176 176 'post_author' => $u, … … 204 204 $f = $this->factory->forum->create(); 205 205 206 $forum = bbp_get_forum_last_reply_id( $f );206 // $forum = bbp_get_forum_last_reply_id( $f ); 207 207 // $this->assertSame( 'bbp_get_forum_last_reply_id', $forum ); 208 208 // $f = $this->factory->forum->create(); … … 215 215 ) ); 216 216 217 $ r1 = $this->factory->reply->create( array(217 $this->factory->reply->create( array( 218 218 'post_parent' => $t, 219 219 'reply_meta' => array( … … 229 229 bbp_get_forum_last_reply_id( $f ); 230 230 231 $ r2 = $this->factory->reply->create( array(231 $this->factory->reply->create( array( 232 232 'post_parent' => $t, 233 233 'reply_meta' => array( … … 258 258 ) ); 259 259 260 $ r = $this->factory->reply->create( array(260 $this->factory->reply->create( array( 261 261 'post_parent' => $t, 262 262 'reply_meta' => array( … … 340 340 ); 341 341 } 342 343 /** 344 * @covers ::bbp_forum_last_topic_id 345 * @covers ::bbp_get_forum_last_topic_id 346 * @covers ::bbp_forum_last_reply_id 347 * @covers ::bbp_get_forum_last_reply_id 348 * @covers ::bbp_topic_last_reply_id 349 * @covers ::bbp_get_topic_last_reply_id 350 */ 351 public function test_bbp_get_forum_and_topic_last_topic_id_and_last_reply_id() { 352 353 $f = $this->factory->forum->create(); 354 355 // Get the forums last topic id _bbp_last_topic_id 356 $this->assertSame( 0, bbp_get_forum_last_topic_id( $f ) ); 357 358 $t = $this->factory->topic->create( array( 359 'post_parent' => $f, 360 'topic_meta' => array( 361 'forum_id' => $f, 362 ) 363 ) ); 364 365 // Get the forums last topic id _bbp_last_topic_id 366 $this->assertSame( $t, bbp_get_forum_last_topic_id( $f ) ); 367 368 // Get the topics last reply id _bbp_last_reply_id 369 $this->assertSame( 0, bbp_get_topic_last_reply_id( $t ) ); 370 371 // Create another reply 372 $r = $this->factory->reply->create( array( 373 'post_parent' => $t, 374 'reply_meta' => array( 375 'forum_id' => $f, 376 'topic_id' => $t, 377 ) 378 ) ); 379 380 // Get the topics last reply id _bbp_last_reply_id 381 $this->assertSame( $r, bbp_get_topic_last_reply_id( $t ) ); 382 } 342 383 }
Note: See TracChangeset
for help on using the changeset viewer.