From 2be4599b7123114be77a03ab3b5ec673e2ed6782 Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Fri, 15 Jun 2018 15:42:48 +0200 Subject: [PATCH 1/2] Re-enabled Test_Author_Queries->test__author_arg__user_is_coauthor__author_arg() --- tests/test-author-queries.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test-author-queries.php b/tests/test-author-queries.php index d6d58c7a..2f50f418 100644 --- a/tests/test-author-queries.php +++ b/tests/test-author-queries.php @@ -60,8 +60,6 @@ public function test__author_name_arg__user_is_coauthor() { } public function test__author_arg__user_is_coauthor__author_arg() { - return; // TODO: re-enable; fails currently because WordPress generates query as `post_author IN (id)` which doesn't match our regex in the posts_where filter. - $author1_id = $this->factory->user->create( array( 'role' => 'author', 'user_login' => 'batman' ) ); $author1 = get_userdata( $author1_id ); $author2_id = $this->factory->user->create( array( 'role' => 'author', 'user_login' => 'superman' ) ); From d55979987d528689c462f452e9de5e60e3a0a727 Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Fri, 15 Jun 2018 15:43:41 +0200 Subject: [PATCH 2/2] Re-enabled Test_Author_Queries->tests__author_name_arg_plus_tax_query__is_coauthor() --- tests/test-author-queries.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test-author-queries.php b/tests/test-author-queries.php index 2f50f418..7d0453ba 100644 --- a/tests/test-author-queries.php +++ b/tests/test-author-queries.php @@ -101,8 +101,6 @@ public function test__author_name_arg_plus_tax_query__user_is_post_author() { } public function tests__author_name_arg_plus_tax_query__is_coauthor() { - return; // TODO: re-enable; fails currently because our posts_join_filter doesn't add an exclusive JOIN on relationships + taxonomy to match the query mods we make. We'd need aliased JOINs on relationships + taxonomy on top of the JOIN that the tax query already adds. - $author1_id = $this->factory->user->create( array( 'role' => 'author', 'user_login' => 'batman' ) ); $author1 = get_userdata( $author1_id ); $author2_id = $this->factory->user->create( array( 'role' => 'author', 'user_login' => 'superman' ) );