Wordpress/tests/phpunit/tests
Scott Taylor 0111ecef55 Canonical/Rewrite: sanity check posts that are paged with `<!--nextpage-->`. Page numbers past the max number of pages are returning the last page of content and causing infinite duplicate content.
Awesome rewrite bug: the `page` query var was being set to `'/4'` in `$wp`. When cast to `int`, it returns `0` (Bless you, PHP). `WP_Query` calls `trim( $page, '/' )` when setting its own query var. The few places that were checking `page`	before posts were queried now have sanity checks, so that these changes work without flushing rewrites.	

Adds/updates unit tests.

Props wonderboymusic, dd32.
See #11694.


git-svn-id: https://develop.svn.wordpress.org/trunk@34492 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 14:03:05 +00:00
..
actions
admin Allow `comment_exists()` to match based on GMT date. 2015-09-23 18:15:39 +00:00
ajax Initialise `$_SERVER[ 'REMOTE_ADDR' ]` during the test bootstrap so individual tests need not. 2015-09-15 08:04:33 +00:00
attachment
canonical Canonical/Rewrite: sanity check posts that are paged with `<!--nextpage-->`. Page numbers past the max number of pages are returning the last page of content and causing infinite duplicate content. 2015-09-24 14:03:05 +00:00
category In `wp_list_categories()`, 'current_category' should accept an array of values. 2015-08-29 19:45:35 +00:00
comment Bail early when invalid ID is passed to `get_comment_class()`. 2015-09-23 14:08:47 +00:00
customize Customizer: Update tests for [34487]. 2015-09-24 11:31:30 +00:00
date
db Remove `svn:executable` from test files. 2015-07-26 09:40:58 +00:00
dependencies
feed Tests: Update `Tests_Feed_RSS::test_items` to expect new comment permalink structure. 2015-09-12 23:30:11 +00:00
filesystem Require dependencies when appropriate in some unit test files. 2015-07-14 03:07:13 +00:00
formatting Comments: in `wp_rel_nofollow_callback()`, account for the fact that a link might already have a `rel` attribute. Currently, if a link already has a `rel`, it will result it duplicate attributes on the element with conflicting values. 2015-09-18 04:35:37 +00:00
functions
general
http HTTP: Add some new Cookie helper functions: 2015-09-22 03:13:13 +00:00
image Media: In `wp_read_image_metadata()`, include IPTC Keywords when available in `$meta`. 2015-09-22 04:18:02 +00:00
import Require dependencies when appropriate in some unit test files. 2015-07-14 03:07:13 +00:00
includes Remove `svn:executable` from test files. 2015-07-26 09:40:58 +00:00
link Unit Tests: after [34477], make `Tests_Link_GetPostCommentsFeedLink` more respectable. 2015-09-24 04:31:58 +00:00
meta
multisite Missed files from [34172]. 2015-09-15 08:08:15 +00:00
option Initialise `$_SERVER[ 'REMOTE_ADDR' ]` during the test bootstrap so individual tests need not. 2015-09-15 08:04:33 +00:00
pomo
post Tests: Remove a `var_dump()` added in [34373]. 2015-09-24 03:07:20 +00:00
query Allow `setup_postdata()` to accept a post ID. 2015-09-12 20:57:06 +00:00
rewrite
template After [34334], update unit tests. 2015-09-19 20:06:52 +00:00
term Add unit tests for `get_term()`. 2015-09-11 03:10:47 +00:00
theme
user Add tests for some missing capabilities, including `do_not_allow`. 2015-09-22 22:17:30 +00:00
xmlrpc After [33325], supply a missing `post_type` in `->mw_editPost()`. 2015-08-13 15:27:57 +00:00
actions.php
adminbar.php Update links to the user profile editing screen in the admin toolbar when the current logged in user has no role on the current site. Covers single site and Multisite and introduces tests. 2015-09-14 17:09:58 +00:00
auth.php Add `'wp_verify_nonce_failed'` action that fires when nonce verification fails. 2015-08-26 00:05:11 +00:00
avatar.php Remove `svn:executable` from test files. 2015-07-26 09:40:58 +00:00
basic.php Tests: Check that `readme.html` is recommending an actively supported version of MySQL. 2015-09-08 03:23:29 +00:00
cache.php
canonical.php Canonical/Rewrite: sanity check posts that are paged with `<!--nextpage-->`. Page numbers past the max number of pages are returning the last page of content and causing infinite duplicate content. 2015-09-24 14:03:05 +00:00
category.php In `Walker_CategoryDropdown::start_el()`, cast values to strings before deciding whether to append 'selected' attribute. 2015-08-21 01:10:34 +00:00
comment.php Don't notify post authors about spam comments. 2015-09-16 21:59:16 +00:00
compat.php
cron.php
db.php WPDB: `get_table_from_query()` didn't find table names with hyphens in them. 2015-08-24 00:18:49 +00:00
dbdelta.php Remove `svn:executable` from test files. 2015-07-26 09:40:58 +00:00
dependencies.php
file.php
filters.php
functions.php Date/Time: Add unit tests for `the_date()`. 2015-09-24 03:33:21 +00:00
kses.php Shortcodes: Improve the reliablity of shortcodes inside HTML tags. 2015-07-22 05:14:50 +00:00
l10n.php
link.php Remove extraneous table join in `get_adjacent_post()`. 2015-09-12 20:33:07 +00:00
mail.php Docs: Put "it's" in its place (again). 2015-09-16 12:45:51 +00:00
media.php Media: Add a new function, `wp_get_attachment_image_url()`, which is a shortcut for `wp_get_attachment_image_src()` - same function signature, but returns just the URL based on `$size`. 2015-09-22 04:12:44 +00:00
meta.php
multisite.php Initialise `$_SERVER[ 'REMOTE_ADDR' ]` during the test bootstrap so individual tests need not. 2015-09-15 08:04:33 +00:00
pluggable.php Implement unit tests which use reflection to test functions in pluggable.php. This means any changes to these functions will need explicit changes to their corresponding tests, which helps prevent unintentional breakage. 2015-09-14 19:14:38 +00:00
post.php In `wp_insert_post()`, when setting `$post_author`, use `isset()` instead of `! empty()` to allow `0` to be passed as the value for `$post_author`. 2015-09-12 18:53:56 +00:00
query.php Better default values in `WP_Query::get_queried_object()`. 2015-09-12 03:36:12 +00:00
rewrite.php In `WP::parse_request()`, don't add query vars of non-viewable post types to `WP::public_query_vars`. In `register_post_type()`, don't add query vars of non-viewable post types to `WP::public_query_vars`. 2015-09-15 18:53:12 +00:00
shortcode.php Add some more data for Shortcode unit tests. 2015-08-25 21:50:55 +00:00
taxonomy.php Allow taxonomies to be non-public. 2015-09-16 19:04:57 +00:00
term.php Failed `get_term_by()` lookups should always return `false`. 2015-09-16 18:49:28 +00:00
theme.php Themes: Get the correct theme when template and stylesheet were both passed as arguments. 2015-08-30 21:44:38 +00:00
upload.php
url.php
user.php Users: in `WP_User::__unset()`, don't reset the deprecated prop `id` to `ID`. Still throw the deprecated notice. 2015-09-24 00:48:23 +00:00
walker.php
widgets.php Widgets: when passing a string arg value to `dynamic_sidebar()`, don't reset `$index` when the arg's sanitized value matches the sanitized name of a sidebar. 2015-09-24 00:29:54 +00:00