Changeset 7799
- Timestamp:
- 10/04/2026 09:14:39 AM (6 weeks ago)
- Location:
- trunk/tests/phpunit/testcases/admin
- Files:
-
- 2 edited
-
tools.php (modified) (1 diff)
-
upgrade-sql.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/admin/tools.php
r7798 r7799 351 351 $count = bbp_get_topic_reply_count_hidden( $t, true ); 352 352 $this->assertSame( 2, $count ); 353 }354 355 /**356 * @covers ::bbp_admin_repair_group_forum_relationship357 * @todo Implement test_bbp_admin_repair_group_forum_relationship().358 */359 public function test_bbp_admin_repair_group_forum_relationship() {360 // Remove the following lines when you implement this test.361 $this->markTestIncomplete(362 'This test has not been implemented yet.'363 );364 353 } 365 354 -
trunk/tests/phpunit/testcases/admin/upgrade-sql.php
r7617 r7799 52 52 $this->assertSame( 'unrelated', $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM `{$this->groupmeta_table}` WHERE group_id = %d", 2 ) ) ); 53 53 } 54 55 /** 56 * @covers ::bbp_admin_upgrade_group_forum_relationships 57 */ 58 public function test_group_forum_upgrade_hides_private_group_forum() { 59 global $wpdb; 60 61 $forum_id = $this->factory->forum->create(); 62 update_post_meta( $forum_id, '_bbp_old_forum_id', '42' ); 63 $wpdb->insert( $this->groups_table, array( 'id' => 7, 'status' => 'private' ) ); 64 $wpdb->insert( $this->groupmeta_table, array( 'group_id' => 7, 'meta_key' => 'forum_id', 'meta_value' => '42' ) ); 65 66 $this->assertSame( 0, bbp_admin_upgrade_group_forum_relationships()[0] ); 67 $this->assertSame( (string) $forum_id, $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM `{$this->groupmeta_table}` WHERE group_id = %d", 7 ) ) ); 68 $this->assertSame( array( 7 ), get_post_meta( $forum_id, '_bbp_group_ids', true ) ); 69 $this->assertSame( bbp_get_hidden_status_id(), bbp_get_forum_visibility( $forum_id ) ); 70 } 54 71 }
Note:
See TracChangeset
for help on using the changeset viewer.