wordpress-develop/tests/phpunit/tests/post
Peter Wilson aec78f5a16 Posts, Post Types: Use global post as the default for wp_get_post_parent_id().
Convert the `$post` parameter of `wp_get_post_parent_id()` to optional, defaulting to the current global post object when called within the loop.

Props danielpost, davidbaumwald, SergeyBiryukov, birgire, audrasjb, hellofromTonya, TimothyBlynJacobs.
Fixes #48358.



git-svn-id: https://develop.svn.wordpress.org/trunk@52194 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 03:23:40 +00:00
..
attachments.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
bodyClass.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
filtering.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
formats.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
getBodyClass.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getLastPostDate.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getLastPostModified.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getPageByPath.php Build/Test Tools: Replace assertInternalType() usage in unit tests. 2021-07-05 17:21:53 +00:00
getPageChildren.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getPages.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
getPageUri.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
getPostClass.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getPosts.php Code is Poetry. 2017-11-30 23:09:33 +00:00
getPostsByAuthorSql.php Tests: Replace assertNotRegExp() with assertDoesNotMatchRegularExpression(). 2021-08-06 21:55:31 +00:00
getPostStatus.php Code Modernization: Replace strftime() and gmstrftime() usage in unit tests. 2021-08-09 19:08:09 +00:00
getPostTypeLabels.php Build/Test Tools: Replace assertInternalType() usage in unit tests. 2021-07-05 17:21:53 +00:00
getTheContent.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
getTheExcerpt.php Posts: Prevent an empty excerpt when groups and nested column blocks are present. 2021-07-06 15:31:48 +00:00
isPostPubliclyViewable.php Code Modernization: Replace strftime() and gmstrftime() usage in unit tests. 2021-08-09 19:08:09 +00:00
isPostStatusViewable.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
isPostTypeViewable.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
meta.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
nav-menu.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
objects.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
output.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
pings.php Tests: Rename some files and classes in phpunit/tests/post/ per the naming conventions. 2020-10-27 16:07:21 +00:00
postClass.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
query.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
revisions.php Revisions: Introduce wp_get_post_revisions_url() to get URL for editing revisions. 2021-11-10 01:25:09 +00:00
slashes.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
template.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
thumbnails.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
types.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
walkerPage.php Coding Standards: Use static closures when not using $this. 2021-08-26 12:57:08 +00:00
wpAfterInsertPost.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
wpGetPostParentId.php Posts, Post Types: Use global post as the default for wp_get_post_parent_id(). 2021-11-17 03:23:40 +00:00
wpInsertPost.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
wpListPages.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
wpPost.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
wpPostType.php Tests: Use more appropriate assertions in various tests. 2021-07-12 10:35:44 +00:00
wpPublishPost.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
wpUniquePostSlug.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00