[wp-trac] [WordPress Trac] #57342: Tests_Query_TaxQuery::test_tax_terms_should_limit_query PHPUnit test is not testing the correct SQL query
WordPress Trac
noreply at wordpress.org
Sat Mar 4 11:50:41 UTC 2023
#57342: Tests_Query_TaxQuery::test_tax_terms_should_limit_query PHPUnit test is not
testing the correct SQL query
------------------------------+-----------------------------
Reporter: david.binda | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"55460" 55460]:
{{{
#!CommitTicketReference repository="" revision="55460"
Tests: Make sure the correct query is tested for term limits in taxonomy
queries.
By hooking into `terms_pre_query` after the fixture posts and terms are
created but before the actual taxonomy query runs, we ensure that the
correct SQL query from `WP_Term_Query::get_terms()` is tested for
requested term limits, rather than the one initiated from
`wp_insert_post()` or `wp_insert_term()` via `term_exists()`.
Follow-up to [52921], [53037].
Props david.binda.
Fixes #57342.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57342#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list