wordpress-develop/tests/phpunit/tests/link
Colin Stewart 60cd149b6f Posts, Post Types: Don't force trailing slash in get_pagenum_link().
Previously, a trailing slash was appended to the link returned from `get_pagenum_link()`. If the permalink structure didn't contain a trailing slash, this link could fail.

This change removes trailing slashes and only appends one if the site is set for adding trailing slashes.

This adds a new test file for the accompanying tests, `tests/phpunit/tests/link/getPagenumLink.php`, and moves an existing test for `get_pagenum_link()` to the same file.

Props davemad-davenet, darkfate, Nazgul, scribu, nacin, obenland, chriscct7, jesin, matthewppelsheimer, audrasjb, petitphp, mukesh27, oglekler, mai21, webtechpooja, tejwanihemant, nicolefurlan, hellofromTonya, costdev.
Fixes #2877.

git-svn-id: https://develop.svn.wordpress.org/trunk@56939 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 00:05:28 +00:00
..
editTermLink.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
getAdjacentPost.php Posts, Post Types: Use persistent caching in get_adjacent_post function. 2023-01-18 11:18:36 +00:00
getAdjacentPostLink.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getDashboardUrl.php Tests: Add missing @covers tags for files in phpunit/tests/link/. 2021-02-28 17:09:39 +00:00
getEditPostLink.php Editor: fix post edit navigation link. 2023-06-27 06:00:59 +00:00
getEditTermLink.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
getFeedLink.php Feeds: Fix the URL returned by get_feed_link() when pretty permalinks are not in use. 2021-02-16 17:32:58 +00:00
getNextCommentsLink.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
getNextPostsLink.php Tests: Add unit tests for get_next_posts_link() and get_previous_posts_link(). 2023-03-01 14:43:27 +00:00
getPagenumLink.php Posts, Post Types: Don't force trailing slash in get_pagenum_link(). 2023-10-16 00:05:28 +00:00
getPostCommentsFeedLink.php Feeds: Avoid notices in get_post_comments_feed_link(). 2021-06-08 22:59:19 +00:00
getPostPermalink.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
getPostTypeArchiveLink.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
getPreviewPostLink.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
getPreviousCommentsLink.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
getPreviousPostsLink.php Tests: Add unit tests for get_next_posts_link() and get_previous_posts_link(). 2023-03-01 14:43:27 +00:00
getThePostsNavigation.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
getThePrivacyPolicyLink.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
nextPosts.php Code Modernization: Fix "passing null to non-nullable" deprecation from next_posts(). 2023-09-28 21:24:35 +00:00
selfAdminUrl.php Tests: Add missing @covers tags for files in phpunit/tests/link/. 2021-02-28 17:09:39 +00:00
themeFile.php Coding Standards: Remove superfluous blank lines at the end of various functions. 2023-09-08 10:01:14 +00:00
wpGetCanonicalUrl.php Permalinks: Revert the changes stemming from pagination limits. 2021-06-08 23:31:46 +00:00