This is a revert of [30494], [30492], [30347], and [30334]. The latter
changeset was a revert of [30336], which was a revert of [30241].
Watch for Term Splitting, Version III in version 4.2, coming soon to a
WordPress trunk near you.
See #30335, #5809.
git-svn-id: https://develop.svn.wordpress.org/trunk@30585 602fd350-edb4-49c9-b593-d223f7449a82
These tests were written to use the `assertImageAtAlpha()` helper method, whose
internals were specific to GD. As a result, the tests could not pass. This
changeset introduces GD- and Imagick-specific versions of this method.
Props voldemortensen.
Fixes#24871.
git-svn-id: https://develop.svn.wordpress.org/trunk@30549 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes broken builds on older versions of MySQL. See #30462.
Assertions regarding indeterminate secondary ORDER BY clauses will go in
separate test methods. See #30478.
git-svn-id: https://develop.svn.wordpress.org/trunk@30548 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the unit tests that fail in earlier versions, see #30471 for fixing this globally in `wp_json_encode()`.
git-svn-id: https://develop.svn.wordpress.org/trunk@30534 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the test is not polluted by permalink structure changes in
earlier tests.
git-svn-id: https://develop.svn.wordpress.org/trunk@30529 602fd350-edb4-49c9-b593-d223f7449a82
It should be defined in a common library file so that all tests have access to
it, even when run in isolation.
See [30345], #21212.
git-svn-id: https://develop.svn.wordpress.org/trunk@30528 602fd350-edb4-49c9-b593-d223f7449a82
In general, skipped tests should live only in patches, which are committed at
the same time that the corresponding bug is fixed. In cases where it's
necessary to skip a test, use `markTestSkipped()` to declare this fact
explicitly.
We continue to check Trac when using `WP_UnitTestCase` to run non-core tests.
See #30284.
git-svn-id: https://develop.svn.wordpress.org/trunk@30526 602fd350-edb4-49c9-b593-d223f7449a82
* Provide sample data that is actually encoded in Big5.
* Do some actual assertions against that data.
Props akumria.
Fixes#30455.
git-svn-id: https://develop.svn.wordpress.org/trunk@30525 602fd350-edb4-49c9-b593-d223f7449a82
In `sanitize_title_with_dashes()` and `sanitize_user()` tests, we break large
test methods into smaller ones in order to isolate those that actually describe
the bug being reported in ticket #10823. The unit tests that are continuing to
fail have been attached as a patch to that ticket.
See #30284.
git-svn-id: https://develop.svn.wordpress.org/trunk@30515 602fd350-edb4-49c9-b593-d223f7449a82
Because `setUpBeforeClass()` is called statically and creates its own factory
object, the iterator logic from previous tests is not carried over to these
fixtures, and we risk the possibility of user_email clashes when the tests are
run in certain limited configurations.
git-svn-id: https://develop.svn.wordpress.org/trunk@30512 602fd350-edb4-49c9-b593-d223f7449a82
`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
* If the split term ID is stored as 'default_category', 'default_link_category', or 'default_email_category', update it to the new ID.
* If the split term ID is associated with a nav menu item, update that piece of postmeta to the new ID.
Props mboynes.
See #30335.
git-svn-id: https://develop.svn.wordpress.org/trunk@30494 602fd350-edb4-49c9-b593-d223f7449a82
`wp_upload_dir()` includes some logic to fall back to the default site's upload directory if a specific directory for the requested site cannot be found. Because of this, if `wpmu_delete_blog()` is fired twice in a row for the same site, the main site's upload directory could be deleted as well.
This adds some checks in `wpmu_delete_blog()` so that we are confident in the site and it's upload directory's existence before dropping the site. Tests are added for when `ms_files_rewriting` is enabled or disabled.
Fixes#30121
git-svn-id: https://develop.svn.wordpress.org/trunk@30404 602fd350-edb4-49c9-b593-d223f7449a82
This behavior was broken when moving the internals to `WP_Comment_Query` in
[30098]. As a result, `get_approved_comments( 0 )` was fetching *all* approved
comments, causing performance issues.
Props dd32.
Fixes#30412.
git-svn-id: https://develop.svn.wordpress.org/trunk@30402 602fd350-edb4-49c9-b593-d223f7449a82
This improves data integrity when inserting and updating rows in the database, particularly when trying to insert emoji into posts stored with character sets that don't support emoji.
See #21212.
git-svn-id: https://develop.svn.wordpress.org/trunk@30400 602fd350-edb4-49c9-b593-d223f7449a82
* Support relative URL input.
* When the URL being made relative has another URL as a parameter, don't make the second URL relative.
Props voldemortensen.
Fixes#30373.
git-svn-id: https://develop.svn.wordpress.org/trunk@30383 602fd350-edb4-49c9-b593-d223f7449a82
The term itself does not have any cached values yet, but in some cases the new
term's taxonomy may need its cached hierarchy to be refreshed as a result of
the term splitting.
Props jorbin.
See #30335.
git-svn-id: https://develop.svn.wordpress.org/trunk@30347 602fd350-edb4-49c9-b593-d223f7449a82