Wordpress/tests/phpunit/tests
Peter Wilson 254ca903b2 REST API, Posts: Add a hook to fire once a post, its terms and meta update.
Introduces the action `wp_after_insert_post` inside a wrapper function of the same name. This hook allows plugin developers to access a posts full data (including its terms and meta data) regardless of the workflow used to save it.

A new parameter is introduced to `wp_insert_post()` to indicate whether the hook should be fired within the function call or will be fired afterward.

Props aristath, Collizo4sky, danielbachhuber, joyously, kadamwhite, kraftbj, markparnell, mikeschroder, noisysocks, peterwilsoncc, SergeyBiryukov, talldanwp, thewebprincess, TimothyBlynJacobs.
Fixes #45114.


git-svn-id: https://develop.svn.wordpress.org/trunk@49172 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-16 03:32:11 +00:00
..
actions Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
admin Community Events: Update timezone-related @since tags to 5.5.2. 2020-10-14 21:33:10 +00:00
ajax Tests: Require imagejpeg() function in Ajax media editing tests. 2020-09-29 14:14:28 +00:00
attachment Coding Standards: Give the $id variable in slashed data tests a more descriptive name. 2020-09-19 10:53:15 +00:00
blocks Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
bookmark Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
canonical Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
category Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:04:18 +00:00
comment Tests: Speed up slashed data tests by reusing some more shared fixtures. 2020-09-19 11:11:00 +00:00
customize REST API, Posts: Add a hook to fire once a post, its terms and meta update. 2020-10-16 03:32:11 +00:00
date Tests: Add a polyfill for assertEqualsWithDelta() to WP_UnitTestCase and use it where appropriate. 2020-09-07 03:12:17 +00:00
db Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
dependencies Update jQuery step two: 2020-10-07 16:31:53 +00:00
editor Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
error-protection Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
external-http Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
feed Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
filesystem Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
formatting Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
functions Add ircs and irc6 to the list of allowed protocols. 2020-09-26 21:00:19 +00:00
general General: Introduce the ability to merge multiple WP_Error objects into one another, and to store more than one item of data for an error. 2020-10-09 22:20:50 +00:00
hooks Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
http Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
image General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
import Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
includes Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
l10n Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
link Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
load
media Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
menu Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
meta Tests: Speed up slashed data tests by reusing some more shared fixtures. 2020-09-19 11:11:00 +00:00
multisite Tests: Fix typo in some markTestSkipped() messages. 2020-09-21 20:18:20 +00:00
oembed Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
option General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
pomo Tests: Simplify PluralFormsTest::test_exceptions(). 2020-09-18 14:11:11 +00:00
post Posts, Post Types: Switch to restoring posts to draft status by default when they are untrashed. 2020-10-11 13:37:04 +00:00
privacy Privacy: Improve clarity of privacy error strings. 2020-10-04 03:21:38 +00:00
query Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
rest-api REST API: Exclude custom site health capability check on multisite. 2020-10-15 02:26:33 +00:00
rewrite Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
sitemaps Tests: Correct the message in a sitemaps test for getting a URL list for a custom taxonomy that is not publicly queryable. 2020-10-14 00:25:43 +00:00
taxonomy Tests: Add missing parent::setUp() calls to all test classes. 2019-01-14 04:54:01 +00:00
term Taxonomy: Improve performance of term recounting database queries. 2020-10-14 00:49:52 +00:00
theme Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
url Tests: Correct a number of malformed @covers tags. 2020-08-23 17:23:52 +00:00
user General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
widgets Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
xmlrpc General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
actions.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
adminbar.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
auth.php REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:12:02 +00:00
avatar.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
basic.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
cache.php Tests: Add a test case for storing false in the cache. 2020-09-06 04:23:46 +00:00
canonical.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
category.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
comment-submission.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
comment.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
compat.php Tests: Consistently use the expectException() method instead of the older @expectedException annotation. 2020-09-18 13:22:22 +00:00
cron.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
db.php Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
dbdelta.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
dependencies.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
file.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
filters.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
functions.php Tests: Use consistent trailing punctuation in markTestSkipped() messages. 2020-09-21 14:05:23 +00:00
kses.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
l10n.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
link.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
locale.php Tests: Fix the failure in test_get_weekday_undefined_index() on PHP 8. 2020-09-18 10:56:27 +00:00
mail.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
media.php Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
meta.php Tests: Replace a few instances of assertNotEquals() with assertNotFalse(). 2020-09-07 04:11:54 +00:00
multisite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
pluggable.php Cache API: Introduce wp_cache_get_multi(). 2020-06-09 19:45:27 +00:00
post.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
query.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
rest-api.php REST API: Support the patternProperties JSON Schema keyword. 2020-10-01 02:47:08 +00:00
rewrite.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
shortcode.php Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
site-health.php Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant. 2020-02-06 06:31:22 +00:00
taxonomy.php Taxonomy: Fix warnings thrown by custom term count callbacks. 2020-10-16 02:41:15 +00:00
template.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
term.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
theme.php Tests: Use consistent trailing punctuation in fail() messages. 2020-09-22 12:32:39 +00:00
upload.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
url.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
user.php Tests: Use assertSame() in test_edit_user_blank_password(), for consistency with other assertions. 2020-10-11 15:49:30 +00:00
walker.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
widgets.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
wp.php Coding Standards: Fix the remaining issues in /tests. 2019-07-08 00:55:20 +00:00