buddypress/tests/phpunit
Mathieu Viet b41ed6c1de BP Messages: make sure Threads unread count is consistent
[13102] introduced a regression considering the way we used to set a thread's unread count. This count is set using the list of recipient objects (which include an `unread_count` property for each user object) by checking for the requested user ID into this list to find the corresponding unread count.

Slicing this list into smaller parts to paginate recipients results introduced potential cases where the requested user ID wasn't found into this paginated list of recipients.

Before doing the slice operation, we need to set the requested user ID thread's unread count to be sure it's the right one and not a `null` value.

Props sjregan

Fixes #8750 (branch 10.0)



git-svn-id: https://buddypress.svn.wordpress.org/branches/10.0@13340 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2022-10-11 19:22:19 +00:00
..
assets Update all references from wp_parse_args to bp_parse_args. 2021-09-12 20:43:39 +00:00
includes Raise WordPress required version to 5.4 2021-11-07 17:22:42 +00:00
testcases BP Messages: make sure Threads unread count is consistent 2022-10-11 19:22:19 +00:00
bootstrap.php Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
codecoverage.xml Travis-CI: disable xdebug globally and switch travis:codecoverage to use xdebug instead of phpdbg. 2016-08-08 13:36:32 +00:00
env.multisite.xml Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
env.xml Build/Test Tools: include @wordpress/env into BuddyPress 2020-08-30 17:53:06 +00:00
multisite.xml Tests: Fix missing 'name' attribute warning for PHPUnit 7. 2020-06-16 04:34:24 +00:00