wordpress-develop/tests/phpunit/tests/post
Boone Gorges 683ae35c33 Disallow post slugs that will result in permalinks that conflict with date archive URLs.
On certain permalink structures, a numeric post slug will result in a post
permalink that conflicts with a date archive URL. For example, with permastruct
`/%year%/%monthnum%/%postname%/`, a post published in May 2015 with slug
`'15'` will result in a URL (`/2015/05/15/`) that conflicts with the archive
for May 15, 2015.

To avoid this problem, `wp_unique_post_slug()` rejects a requested slug when it
would generate a conflict of this type. Thus, in our example, `'15'` would
become `'15-2'`.

Props valendesigns, boonebgorges, Denis-de-Bernardy, loushou.
See #5305.

git-svn-id: https://develop.svn.wordpress.org/trunk@32647 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 12:52:17 +00:00
..
attachments.php Attachment URLs should only be forced to SSL on the front end. 2015-05-04 13:09:14 +00:00
filtering.php Remove failing Unbalanced tags tests 2014-11-08 23:14:28 +00:00
formats.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
getBodyClass.php Avoid duplicate classes for different terms with UTF-8 slugs in post_class() and body_class(). 2015-04-02 01:04:22 +00:00
getPageChildren.php Unit tests for get_page_children(). 2015-05-05 19:36:46 +00:00
getPages.php Give up on making uninterrupted hierarchies work in get_page_children() for now, reverts [30159], [30246], [30636]. 2014-12-04 00:23:47 +00:00
getPostClass.php Avoid duplicate classes for different terms with UTF-8 slugs in post_class() and body_class(). 2015-04-02 01:04:22 +00:00
getPostsByAuthorSql.php Streamline support for multiple post types in get_posts_by_author_sql(). 2015-05-21 19:48:19 +00:00
listPages.php Remove failing test related to wp_list_pages(). 2014-11-22 20:43:56 +00:00
meta.php In PHPUnit test classes, parent::tearDown() should be the last thing done in tearDown() methods. 2015-03-05 13:14:15 +00:00
nav-menu.php When priming the cache for taxonomy term nav items, don't fetch term descendants. 2015-04-24 18:57:07 +00:00
objects.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
output.php Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
query.php Improve organiation of tax_query and meta_query unit tests. 2015-01-27 20:03:50 +00:00
revisions.php In PHPUnit test classes, parent::tearDown() should be the last thing done in tearDown() methods. 2015-03-05 13:14:15 +00:00
slashes.php Fix typo in a comment in slashing tests. 2015-01-07 07:08:47 +00:00
template.php Fix line endings after [31522]. 2015-02-24 10:05:48 +00:00
types.php Use more descriptive names for register_post_type() and register_taxonomy() tests with too long and too short names. 2015-02-13 23:33:56 +00:00
wpUniquePostSlug.php Disallow post slugs that will result in permalinks that conflict with date archive URLs. 2015-05-29 12:52:17 +00:00