Wordpress/tests/phpunit/tests
Boone Gorges cfeae751a0 Improve performance of post revision order test.
`test_revision_order()` was written ([28541], #26042) to ensure that revision
order was properly preserved in two different cases: (1) where the post_date
varied (in which case the revisions would be sorted by post_date DESC) and
(2) where the post_date was the same (in which case sorting would fall back on
ID DESC). In an attempt to ensure that both of these scenarios arose in the
context of a single test, 100 posts were created. We can make the process far
more efficient by manually creating the revisions with the post_dates
explicitly declared, and splitting the two different cases into two separate
test methods.

This test was previously the single worst offender in the entire suite, taking
upwards of 15 seconds to run. All that most maddens and torments; all that stirs
up the lees of things; all truth with malice in it; all that cracks the sinews
and cakes the brain; all the subtle demonisms of life and thought; all evil, to
crazy Boone, were visibly personified, and made practically assailable in
`test_revision_order()`.

See #30017.

git-svn-id: https://develop.svn.wordpress.org/trunk@30511 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-22 14:17:21 +00:00
..
actions Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
admin Update unit tests to reflect: 2014-06-09 15:58:16 +00:00
ajax Wouldn't it be incredible if you could run Unit Tests without all of your uploads being indiscriminately blown away and your upload folder permissions being destroyed? 2014-07-12 07:08:15 +00:00
attachment Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
canonical Remove failing unit tests from 'canonical' group. 2014-11-08 20:36:27 +00:00
comment Return an empty array from get_approved_comments() when $post_id is empty. 2014-11-20 01:51:38 +00:00
date Introduced dayofweek_iso time param for WP_Date_Query. 2014-11-01 03:23:15 +00:00
db WPDB: When a db.php drop-in is being used, and it doesn't explicitly define itself as connecting to MySQL, skip the character set checks. This ensures that existing drop-ins won't accidentally run checks that they don't support. 2014-11-18 03:37:23 +00:00
dependencies Update expected results in wp_add_inline_style() unit tests after [29958]. 2014-10-19 21:23:32 +00:00
export When setting WP_TESTS_FORCE_KNOWN_BUGS to true, it is preferable that some forced tests are still skipped when they call classes or functions that do not exist, producing fatal errors. 2013-11-25 22:49:51 +00:00
feed Fix PHP notice in Tests_Feed_RSS2::test_items(). 2014-11-10 02:04:22 +00:00
filesystem Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
formatting Anchor texturize to shortcodes to improve regex efficiency. 2014-11-20 14:27:08 +00:00
functions Ignore case when checking string 'false' in wp_validate_boolean(). 2014-11-03 15:54:42 +00:00
general [28785] introduced a bug, where encoded query arguments were decoded by parse_str() inside of wp_parse_str() but never re-encoded later on. 2014-11-01 00:53:26 +00:00
http HTTP API: Support both the 'limit_response_size' and 'stream' parameters at the same time, allowing a partial file download. 2014-10-20 07:31:45 +00:00
image Fix setting default quality in WP_Image_Editor. 2014-10-04 13:11:38 +00:00
import Use HTTPS URLs for core.trac.wordpress.org 2014-09-29 13:27:55 +00:00
includes Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
link Add tests for get_adjacent_post_link() wrappers. 2014-11-06 20:16:10 +00:00
meta Make orderby=meta_value compatible with meta_query when relation=OR. 2014-10-19 18:53:55 +00:00
multisite Prevent wpmu_delete_blog from removing the wrong uploads directory 2014-11-20 06:52:07 +00:00
option Split and organize multisite unit tests 2014-10-16 05:06:22 +00:00
pomo Fix strict notices in Tests_POMO_PO. 2013-12-01 12:47:35 +00:00
post Improve performance of post revision order test. 2014-11-22 14:17:21 +00:00
query Add unit test files mistakenly excluded from [30085]. 2014-11-17 16:16:01 +00:00
term Improve cleanup of cached term_ids after shared terms are split. 2014-11-21 03:16:08 +00:00
theme Clean up 'post-thumbnail' theme support unit tests. 2014-11-01 04:00:59 +00:00
user Introduce $post_type param for count_user_posts(). 2014-11-13 02:18:30 +00:00
xmlrpc Remove failing uploadfile test in trunk 2014-11-08 21:55:41 +00:00
actions.php Introduce doing_filter() and doing_action() to identify hooks in progress. 2014-02-26 18:43:59 +00:00
adminbar.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
auth.php More tests for [30466]. props xknown. 2014-11-20 16:10:24 +00:00
basic.php Adds a unit test to demonstrate that the order of case and default in a switch statement does not matter. 2014-05-30 17:31:51 +00:00
cache.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
canonical.php Remove failing unit tests from 'canonical' group. 2014-11-08 20:36:27 +00:00
category.php Update unit tests to reflect: 2014-06-09 15:58:16 +00:00
comment.php Return an empty array from get_approved_comments() when $post_id is empty. 2014-11-20 01:51:38 +00:00
compat.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
cron.php wp_schedule_single_event() should not prevent scheduling a future duplicate event. It should only reject an event as a duplicate if there is already a similar event scheduled within 10 minutes of the given timestamp. 2014-10-17 19:16:26 +00:00
db.php WPDB: Force STRICT_ALL_TABLES to be enabled as soon as we connect to the MySQL server. 2014-11-20 01:45:10 +00:00
dependencies.php Remove tests for code still in development, see #22229. If accidentally run, they produce fatal errors. 2013-10-07 14:17:13 +00:00
file.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
filters.php Unit tests for has_filter() not resetting the array pointer. 2014-09-02 06:49:11 +00:00
functions.php Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8. 2014-10-28 18:34:16 +00:00
iterators.php When setting WP_TESTS_FORCE_KNOWN_BUGS to true, it is preferable that some forced tests are still skipped when they call classes or functions that do not exist, producing fatal errors. 2013-11-25 22:49:51 +00:00
kses.php Make wp_kses_no_null() remove any invalid control characters in a string. 2014-07-01 18:00:50 +00:00
l10n.php Revert [25405] and use a file that does exist. see #25282. 2013-09-12 17:47:40 +00:00
link.php Fix a MySQL warning in the test_get_adjacent_post_exclude_self_term unit test, caused by [30400]. 2014-11-20 01:47:30 +00:00
mail.php Avoid a notice and clean up setting/unsetting of globals by moving them into setUp() and tearDown() methods in Tests_Mail. 2013-09-12 04:46:49 +00:00
media.php Replace invalid use of ltrim() in attachment_url_to_postid() with substr(). 2014-11-21 06:34:23 +00:00
meta.php Pass all updated meta IDs to filters in update_metadata(). 2014-11-01 02:38:19 +00:00
multisite.php Split and organize multisite unit tests 2014-10-16 05:06:22 +00:00
post.php Remove some failing unit tests from the post group. 2014-11-22 12:03:48 +00:00
query.php Improve global variable setting in setup_postdata(). 2014-10-29 02:31:37 +00:00
rewrite.php Setup rewrite changes in tests in a predictable fashion. Don't mix method calls with wrapper function calls. 2014-07-03 01:42:57 +00:00
shortcode.php Remove failing shortcode unit tests 2014-11-08 22:50:30 +00:00
taxonomy.php Introduce term_template param to get_the_taxonomies(). 2014-11-03 18:48:42 +00:00
term.php Reinstate term splitting on term update. 2014-11-14 21:26:48 +00:00
theme.php Fix formatting in [29946]. 2014-10-17 22:14:49 +00:00
upload.php Wouldn't it be incredible if you could run Unit Tests without all of your uploads being indiscriminately blown away and your upload folder permissions being destroyed? 2014-07-12 07:08:15 +00:00
url.php Forcing SSL logins now forces SSL for the entire admin, with no middle ground. 2014-05-29 03:58:41 +00:00
user.php Invalidate password keys when a user's email changes. 2014-11-20 13:39:03 +00:00
walker.php Add unit tests for Walker class. 2014-08-01 20:35:25 +00:00
widgets.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00