From 6d2df28080034c59b4726ed5d381c22c4d008a59 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Tue, 28 May 2024 10:30:14 +0100 Subject: [PATCH] Correct the args for WP_User_Query --- tests/phpunit/test-wp-user-query.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/test-wp-user-query.php b/tests/phpunit/test-wp-user-query.php index 0f4530e..5e98da5 100644 --- a/tests/phpunit/test-wp-user-query.php +++ b/tests/phpunit/test-wp-user-query.php @@ -68,7 +68,7 @@ public function testQueryForAuthorWithPublishedPostsReturnsAttributedAuthors() : ] ); $common_args = [ - 'fields' => 'ids', + 'fields' => 'ID', 'orderby' => 'ID', 'order' => 'ASC', ]; @@ -83,8 +83,7 @@ public function testQueryForAuthorWithPublishedPostsReturnsAttributedAuthors() : $test_key => $test_value, ] ); - $query = new WP_User_Query(); - $users = $query->query( $args ); + $users = new WP_User_Query( $args ); $this->assertSame( [ self::$users['editor']->ID, self::$users[ GUEST_ROLE ]->ID ], @@ -103,8 +102,7 @@ public function testQueryForAuthorWithPublishedPostsReturnsAttributedAuthors() : $test_key => $test_value, ] ); - $query = new WP_User_Query(); - $users = $query->query( $args ); + $users = new WP_User_Query( $args ); $this->assertSame( [ self::$users['admin']->ID, self::$users['author']->ID ], @@ -123,8 +121,7 @@ public function testQueryForAuthorWithPublishedPostsReturnsAttributedAuthors() : $test_key => $test_value, ] ); - $query = new WP_User_Query(); - $users = $query->query( $args ); + $users = new WP_User_Query( $args ); $this->assertSame( [