wordpress-develop/tests
Sergey Biryukov e70b0f7c3d Tests: Avoid duplicate queries in some WP_Query tests.
When passing args to the `WP_Query::__construct()` method, it internally executes the `WP_Query::get_posts()` method and stores the result in the `WP_Query::posts` property.

When calling `WP_Query::get_posts()` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.

Thus, the correct usage is to read the posts already stored in the `WP_Query::posts` property.

Follow-up to [1062/tests], [1065/tests], [1066/tests], [1070/tests], [29805], [31286], [49900], [51144].

Props david.binda.
Fixes #54822.

git-svn-id: https://develop.svn.wordpress.org/trunk@52577 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-14 17:50:52 +00:00
..
e2e Build/Test Tools: Make adjustments to how Quick Draft tests confirm expected behavior. 2021-11-10 01:49:01 +00:00
gutenberg Block Editor: Update the Gutenberg branch used to launch Gutenberg e2e tests. 2021-06-01 09:21:36 +00:00
phpunit Tests: Avoid duplicate queries in some WP_Query tests. 2022-01-14 17:50:52 +00:00
qunit Tests: Update qUnit test fixtures after [52535]. 2022-01-06 23:23:23 +00:00
visual-regression Build/Test Tools: Introduce local visual regression testing. 2021-11-02 21:03:10 +00:00