Changeset 7365
- Timestamp:
- 11/17/2025 06:00:44 AM (4 months ago)
- Location:
- trunk/tests/phpunit/testcases
- Files:
-
- 9 edited
-
admin/tools.php (modified) (9 diffs)
-
core/cache.php (modified) (1 diff)
-
core/update.php (modified) (2 diffs)
-
forums/functions/counts.php (modified) (3 diffs)
-
forums/functions/forum.php (modified) (2 diffs)
-
forums/template/counts.php (modified) (3 diffs)
-
forums/template/forum.php (modified) (1 diff)
-
topics/functions/status.php (modified) (3 diffs)
-
users/template/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/admin/tools.php
r7353 r7365 282 282 283 283 // Category topic count hidden. 284 $count = bbp_get_forum_topic_count_hidden( $c, true );284 $count = bbp_get_forum_topic_count_hidden( $c, true, true ); 285 285 $this->assertSame( 0, $count ); 286 286 … … 294 294 295 295 // Forum topic count hidden. 296 $count = bbp_get_forum_topic_count_hidden( $f, true );296 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 297 297 $this->assertSame( 0, $count ); 298 298 … … 309 309 310 310 // Category topic count hidden. 311 $count = bbp_get_forum_topic_count_hidden( $c, true );311 $count = bbp_get_forum_topic_count_hidden( $c, false, true ); 312 312 $this->assertSame( 0, $count ); 313 313 … … 321 321 322 322 // Forum topic count hidden. 323 $count = bbp_get_forum_topic_count_hidden( $f, true );323 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 324 324 $this->assertSame( 2, $count ); 325 325 … … 342 342 343 343 // Category topic count hidden. 344 $count = bbp_get_forum_topic_count_hidden( $c, true );344 $count = bbp_get_forum_topic_count_hidden( $c, false, true ); 345 345 $this->assertSame( 0, $count ); 346 346 … … 354 354 355 355 // Forum topic count hidden. 356 $count = bbp_get_forum_topic_count_hidden( $f, true );356 $count = bbp_get_forum_topic_count_hidden( $f, false, true ); 357 357 $this->assertSame( 0, $count ); 358 358 … … 369 369 370 370 // Category topic count hidden. 371 $count = bbp_get_forum_topic_count_hidden( $c, true );371 $count = bbp_get_forum_topic_count_hidden( $c, false, true ); 372 372 $this->assertSame( 0, $count ); 373 373 … … 381 381 382 382 // Forum topic count hidden. 383 $count = bbp_get_forum_topic_count_hidden( $f, true );383 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 384 384 $this->assertSame( 2, $count ); 385 385 } … … 667 667 clean_post_cache( $r ); 668 668 669 // Forums should NOT have a _bbp_forum_id meta key670 $this->assertEquals( array(), get_post_meta( $f, '_bbp_forum_id', false ) );671 672 669 // Topics should have a _bbp_forum_id meta key 673 670 $this->assertEquals( array( $f ), get_post_meta( $t, '_bbp_forum_id', false ) ); -
trunk/tests/phpunit/testcases/core/cache.php
r6846 r7365 38 38 39 39 // Setup 40 $f_key = md5( serialize( array( 'parent_id' => $f, 'post_type' => $tpt ) ) );41 $t_key = md5( serialize( array( 'parent_id' => $t, 'post_type' => $rpt ) ) );40 $f_key = md5( serialize( array( 'parent_id' => $f, 'post_type' => $tpt, 'post_status' => array( 'draft', 'future' ) ) ) ); 41 $t_key = md5( serialize( array( 'parent_id' => $t, 'post_type' => $rpt, 'post_status' => array( 'draft', 'future' ) ) ) ); 42 42 $last_changed = wp_cache_get_last_changed( 'bbpress_posts' ); 43 43 -
trunk/tests/phpunit/testcases/core/update.php
r6801 r7365 130 130 $this->assertSame( 1, bbp_get_forum_subforum_count( $category_id, true ) ); 131 131 $this->assertSame( 0, bbp_get_forum_topic_count( $category_id, false, true ) ); 132 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $category_id, true ) );132 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $category_id, true, true ) ); 133 133 $this->assertSame( 0, bbp_get_forum_reply_count( $category_id, false, true ) ); 134 134 $this->assertSame( 1, bbp_get_forum_topic_count( $category_id, true, true ) ); … … 146 146 $this->assertSame( 0, bbp_get_forum_subforum_count( $forum_id, true ) ); 147 147 $this->assertSame( 1, bbp_get_forum_topic_count( $forum_id, false, true ) ); 148 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $forum_id, true ) );148 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $forum_id, true, true ) ); 149 149 $this->assertSame( 1, bbp_get_forum_reply_count( $forum_id, false, true ) ); 150 150 $this->assertSame( 1, bbp_get_forum_topic_count( $forum_id, true, true ) ); -
trunk/tests/phpunit/testcases/forums/functions/counts.php
r6848 r7365 536 536 bbp_update_forum_topic_count_hidden( $f ); 537 537 538 $count = bbp_get_forum_topic_count_hidden( $f, true );539 $this->assertSame( 0, $count ); ;538 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 539 $this->assertSame( 0, $count ); 540 540 541 541 bbp_spam_topic( $t[2] ); … … 543 543 bbp_update_forum_topic_count_hidden( $f ); 544 544 545 $count = bbp_get_forum_topic_count_hidden( $f, true );546 $this->assertSame( 1, $count ); ;545 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 546 $this->assertSame( 1, $count ); 547 547 548 548 bbp_unapprove_topic( $t[0] ); … … 550 550 bbp_update_forum_topic_count_hidden( $f ); 551 551 552 $count = bbp_get_forum_topic_count_hidden( $f, true );552 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 553 553 $this->assertSame( 2, $count ); 554 554 } -
trunk/tests/phpunit/testcases/forums/functions/forum.php
r6004 r7365 95 95 $this->assertSame( 0, bbp_get_forum_topic_count( $c, false, true ) ); 96 96 $this->assertSame( 1, bbp_get_forum_topic_count( $c, true, true ) ); 97 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $c, true ) );97 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $c, true, true ) ); 98 98 $this->assertSame( 0, bbp_get_forum_reply_count( $c, false, true ) ); 99 99 $this->assertSame( 1, bbp_get_forum_reply_count( $c, true, true ) ); … … 109 109 $this->assertSame( 1, bbp_get_forum_topic_count( $f, false, true ) ); 110 110 $this->assertSame( 1, bbp_get_forum_topic_count( $f, true, true ) ); 111 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $f, true ) );111 $this->assertSame( 0, bbp_get_forum_topic_count_hidden( $f, true, true ) ); 112 112 $this->assertSame( 1, bbp_get_forum_reply_count( $f, false, true ) ); 113 113 $this->assertSame( 1, bbp_get_forum_reply_count( $f, true, true ) ); -
trunk/tests/phpunit/testcases/forums/template/counts.php
r6006 r7365 220 220 'post_parent' => $c, 221 221 'forum_meta' => array( 222 'forum_id' => $c,222 'forum_id' => $c, 223 223 ), 224 224 ) ); … … 238 238 $count = bbp_get_forum_topic_count_hidden( $f, false ); 239 239 $this->expectOutputString( $formatted_value ); 240 bbp_forum_topic_count_hidden( $f );240 bbp_forum_topic_count_hidden( $f, false, true ); 241 241 242 242 // Forum formatted string. … … 245 245 246 246 // Forum integer. 247 $count = bbp_get_forum_topic_count_hidden( $f, true );247 $count = bbp_get_forum_topic_count_hidden( $f, false, true ); 248 248 $this->assertSame( $int_value, $count ); 249 249 250 250 // Category topic count hidden. 251 $count = bbp_get_forum_topic_count_hidden( $c, true );251 $count = bbp_get_forum_topic_count_hidden( $c, true, true ); 252 252 $this->assertSame( 0, $count ); 253 253 254 254 // Category total topic count hidden. 255 $count = bbp_get_forum_topic_count_hidden( $c, true );255 $count = bbp_get_forum_topic_count_hidden( $c, true, true ); 256 256 $this->assertSame( 0, $count ); 257 257 } -
trunk/tests/phpunit/testcases/forums/template/forum.php
r5962 r7365 67 67 'post_title' => 'Private Category', 68 68 ) ); 69 bbp_privatize_forum( $c ); 69 70 70 71 $category = bbp_get_forum_permalink( $c ); 71 72 $forum = bbp_get_forum_permalink( $f );73 72 $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/?forum=private-category', $category ); 74 73 -
trunk/tests/phpunit/testcases/topics/functions/status.php
r6434 r7365 110 110 $this->assertSame( 0, $count ); 111 111 112 $count = bbp_get_forum_topic_count_hidden( $f, true );112 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 113 113 $this->assertSame( 1, $count ); 114 114 … … 120 120 121 121 $last_reply_id = bbp_get_forum_last_reply_id( $f ); 122 $this->assertSame( $ t, $last_reply_id );122 $this->assertSame( $r[1], $last_reply_id ); 123 123 124 124 $last_active_id = bbp_get_forum_last_active_id( $f ); 125 $this->assertSame( $ t, $last_active_id );125 $this->assertSame( $r[1], $last_active_id ); 126 126 127 127 $last_active_time = bbp_get_forum_last_active_time( $f ); … … 271 271 $this->assertSame( 1, $count ); 272 272 273 $count = bbp_get_forum_topic_count_hidden( $f, true );273 $count = bbp_get_forum_topic_count_hidden( $f, true, true ); 274 274 $this->assertSame( 0, $count ); 275 275 -
trunk/tests/phpunit/testcases/users/template/user.php
r7353 r7365 714 714 $this->set_permalink_structure( '/%postname%/' ); 715 715 $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/" title="View ' . $display_name . ''s profile" class="bbp-author-link"><span class="bbp-author-avatar">' . $wp_avatar . 716 '</span> <span class="bbp-author-name">' . $display_name . '</span></a>';716 '</span><span class="bbp-author-name">' . $display_name . '</span></a>'; 717 717 718 718 // String. … … 729 729 $author_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user=' . $this->keymaster_id . '" title="View ' . $display_name . 730 730 ''s profile" class="bbp-author-link"><span class="bbp-author-avatar">' . $wp_avatar . 731 '</span> <span class="bbp-author-name">' . $display_name . '</span></a>';731 '</span><span class="bbp-author-name">' . $display_name . '</span></a>'; 732 732 733 733 // String.
Note: See TracChangeset
for help on using the changeset viewer.