From e415270afbb752aba0386fe400293757a6fc903f Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 4 May 2016 18:48:08 +0000 Subject: [PATCH] Tests: Correct 'meta_query' syntax in test related to `WP_User_Query` 'who' param. The test, introduced in [32207], used the incorrect syntax for 'meta_query' - one fewer level of array-nesting than what `WP_Meta_Query` requires. This slip uncovered a bug introduced into `WP_User_Query` in [30094], whereby an incorrectly formatted 'meta_query' parameter would be properly parsed by `WP_User_Query` when passed alongside `who=authors`. We need to fix the inconsistent syntax in order to resolve #36724. See #36724, #32019, #23849, #27026. git-svn-id: https://develop.svn.wordpress.org/trunk@37359 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/query.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/user/query.php b/tests/phpunit/tests/user/query.php index 7704344d62..1fe2652f3c 100644 --- a/tests/phpunit/tests/user/query.php +++ b/tests/phpunit/tests/user/query.php @@ -688,8 +688,10 @@ class Tests_User_Query extends WP_UnitTestCase { 'who' => 'authors', 'blog_id' => $b, 'meta_query' => array( - 'key' => 'foo', - 'value' => 'bar', + array( + 'key' => 'foo', + 'value' => 'bar', + ) ), ) );