You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_activitypub_following' AND meta_value != %s",
1056
+
Actors::APPLICATION_USER_ID
1057
+
)
1058
+
);
1059
+
$this->assertEquals( 2, $remaining_other_count, 'Other _activitypub_following entries should remain' );
1060
+
1061
+
// Verify other meta keys are unaffected.
1062
+
$this->assertEquals( Actors::APPLICATION_USER_ID, \get_post_meta( $post1, '_activitypub_other_meta', true ), 'Other meta keys should not be affected' );
1063
+
$this->assertEquals( Actors::APPLICATION_USER_ID, \get_post_meta( $post2, 'some_other_meta', true ), 'Other meta keys should not be affected' );
1064
+
1065
+
// Clean up.
1066
+
\wp_delete_post( $post1, true );
1067
+
\wp_delete_post( $post2, true );
1068
+
\wp_delete_post( $post3, true );
1069
+
}
1070
+
1071
+
/**
1072
+
* Test remove_pending_application_user_follow_requests with no matching entries.
$this->assertEquals( $initial_following_count, $final_following_count, 'No _activitypub_following entries should be removed' );
1111
+
$this->assertEquals( $initial_total_count, $final_total_count, 'Total meta count should remain the same' );
1112
+
1113
+
// Verify specific entries remain.
1114
+
$this->assertEquals( '123', \get_post_meta( $post1, '_activitypub_following', true ), '_activitypub_following with different value should remain' );
1115
+
$this->assertEquals( '456', \get_post_meta( $post2, '_activitypub_following', true ), '_activitypub_following with different value should remain' );
1116
+
$this->assertEquals( Actors::APPLICATION_USER_ID, \get_post_meta( $post1, '_activitypub_other_meta', true ), 'Other meta keys should not be affected' );
1117
+
$this->assertEquals( Actors::APPLICATION_USER_ID, \get_post_meta( $post2, 'different_meta', true ), 'Other meta keys should not be affected' );
1118
+
1119
+
// Clean up.
1120
+
\wp_delete_post( $post1, true );
1121
+
\wp_delete_post( $post2, true );
1122
+
}
1123
+
1124
+
/**
1125
+
* Test remove_pending_application_user_follow_requests with multiple APPLICATION_USER_ID entries on same post.
0 commit comments