Changeset 7796 for trunk/tests/phpunit/testcases/admin/tools.php
- Timestamp:
- 10/04/2026 09:04:38 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/testcases/admin/tools.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/admin/tools.php
r7795 r7796 856 856 /** 857 857 * @covers ::bbp_admin_repair_user_favorites 858 * @todo Implement test_bbp_admin_repair_user_favorites().859 858 */ 860 859 public function test_bbp_admin_repair_user_favorites() { 861 // Remove the following lines when you implement this test. 862 $this->markTestIncomplete( 863 'This test has not been implemented yet.' 864 ); 860 $user_id = $this->factory->user->create(); 861 $live_id = $this->factory->topic->create(); 862 $old_id = $this->factory->topic->create(); 863 $key = bbp_db()->prefix . '_bbp_favorites'; 864 wp_trash_post( $old_id ); 865 update_user_meta( $user_id, $key, "{$live_id},{$old_id}" ); 866 867 $this->assertSame( 0, bbp_admin_repair_user_favorites()[0] ); 868 $this->assertSame( (string) $live_id, get_user_meta( $user_id, $key, true ) ); 865 869 } 866 870 867 871 /** 868 872 * @covers ::bbp_admin_repair_user_topic_subscriptions 869 * @todo Implement test_bbp_admin_repair_user_topic_subscriptions().870 873 */ 871 874 public function test_bbp_admin_repair_user_topic_subscriptions() { 872 // Remove the following lines when you implement this test. 873 $this->markTestIncomplete( 874 'This test has not been implemented yet.' 875 ); 875 $user_id = $this->factory->user->create(); 876 $live_id = $this->factory->topic->create(); 877 $old_id = $this->factory->topic->create(); 878 $key = bbp_db()->prefix . '_bbp_subscriptions'; 879 wp_trash_post( $old_id ); 880 update_user_meta( $user_id, $key, "{$live_id},{$old_id}" ); 881 882 $this->assertSame( 0, bbp_admin_repair_user_topic_subscriptions()[0] ); 883 $this->assertSame( (string) $live_id, get_user_meta( $user_id, $key, true ) ); 876 884 } 877 885 878 886 /** 879 887 * @covers ::bbp_admin_repair_user_forum_subscriptions 880 * @todo Implement test_bbp_admin_repair_user_forum_subscriptions().881 888 */ 882 889 public function test_bbp_admin_repair_user_forum_subscriptions() { 883 // Remove the following lines when you implement this test. 884 $this->markTestIncomplete( 885 'This test has not been implemented yet.' 886 ); 890 $user_id = $this->factory->user->create(); 891 $live_id = $this->factory->forum->create(); 892 $old_id = $this->factory->forum->create(); 893 $key = bbp_db()->prefix . '_bbp_forum_subscriptions'; 894 wp_trash_post( $old_id ); 895 update_user_meta( $user_id, $key, "{$live_id},{$old_id}" ); 896 897 $this->assertSame( 0, bbp_admin_repair_user_forum_subscriptions()[0] ); 898 $this->assertSame( (string) $live_id, get_user_meta( $user_id, $key, true ) ); 887 899 } 888 900
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)