#27741 closed defect (bug) (duplicate)
Broken Tests_User_Query::test_prepare_query() in Multisite
Reported by: | bpetty | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 3.9 |
Component: | Query | Keywords: | dev-feedback |
Focuses: | multisite | Cc: |
Description
There was a fix for #21119 applied a couple months ago that added additional unit tests which do pass in single-site test runs, but fail under multisite (and have since the test was added two months ago):
1) Tests_User_Query::test_prepare_query Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ 0 => Array (...) + 1 => Array (...) ) ) /vagrant/wordpress/tests/phpunit/tests/user/query.php:135
I'm opening up a new ticket for this since a patch was already applied to the 3.9 branch, and given it's been in there for a couple months, it's likely just fine, and this can wait for a future release.
However, I would at least like the initial patch attached here applied immediately so this test is skipped for the 3.9 release for now, with this ticket being used for tracking it as a known issue beyond that. Feel free to punt this to Future Release when this is done.
Attachments (1)
Change History (4)
#2
@
11 years ago
- Milestone changed from 3.9 to Future Release
It's pretty easy to see where in the code this fails. We have a $role || is_multisite()
check in there as we use a role-based query to see what site users are a member of.
#3
@
11 years ago
- Milestone Future Release deleted
- Resolution set to duplicate
- Status changed from new to closed
I was going to commit [ticket-27741-user-query-test.patch] (hence the move to Future) but I think this test failure is actually indicative of a problem in the original ticket. Closing as a duplicate of #21119.
The arrays are nearly identical, except for
meta_query
, where the second one contains duplicate keys: