Wordpress/tests/phpunit/tests/post
Scott Taylor fabd554bb2 Merge the Responsive Images feature plugin into core, initial commit. See: https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/
New functions in `media.php`:
* `wp_get_attachment_image_srcset_array()` - Returns an array of image candidate string data used to build a `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_srcset()` - Returns the `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_sizes()` - Returns the `sizes` value for an attachment given an `$attachement_id` and `$size` and optional arguments used to alter its output.
* `wp_make_content_images_responsive()` - A display filter for adding `srcset` and `sizes` to images embedded in content.
* `wp_img_add_srcset_and_sizes()` - A utility function used by `wp_make_content_images_responsive()` to add `srcset` and `sizes` to a single `<img>` element.

Modifies existing core functions:
* Modify `wp_get_attachment_image()` so the HTML returned for an image includes `srcset` and `sizes`.
* Modify `get_media_embedded_in_content()` (sup, 3.6 leftover) by adding `<img>` to the list of accepted tags that can be matched in content. This is used in `wp_make_content_images_responsive()` to find all of the images embedded in content before passing them off to `wp_img_add_srcset_and_sizes()`.

Tests:
* Add a new factory method to `WP_UnitTest_Factory_For_Attachment` named `create_upload_object()`
* Adds unit tests
* Updates unit tests

Props joemcgill, tevko, jaspermdegroot, mdmcginn, barryceelen, peterwilsoncc, fsylum, wonderboymusic, chriscoyier, benjaminpick, jrfnl, #12kingkool68, janhenckens, ryanmarkel, side777, ryelle, wturrell, micahmills, mattbagwell, coliff, DrewAPicture.
See #33641.


git-svn-id: https://develop.svn.wordpress.org/trunk@34855 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 04:58:21 +00:00
..
attachments.php In `wp_mime_type_icon()`, the length of the `$wilds` array varies depending on what is passed as `$mime`. Loop over `$wilds` instead of arbitrarily checking `$wilds[0]`. 2015-09-17 00:36:12 +00:00
filtering.php
formats.php
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 Tests: Add two tests for the current behavior of the 'hierarchical' and 'child_of' arguments in `get_pages()`. 2015-09-29 21:27:03 +00:00
getPostClass.php Use `wp_installing()` instead of `WP_INSTALLING` constant. 2015-10-05 15:05:26 +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
output.php
query.php Introduce `post_name__in` parameter for `WP_Query`. 2015-08-20 02:18:05 +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 Correctly slash post fields when trashing and untrashing posts. 2015-09-28 19:25:05 +00:00
template.php Tests: Add a test for the 'before' and 'after' arguments in `wp_page_menu()` when used as a fallback for `wp_nav_menu()`. 2015-09-28 00:46:19 +00:00
thumbnails.php Merge the Responsive Images feature plugin into core, initial commit. See: https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/ 2015-10-06 04:58:21 +00:00
types.php Objects are passed by-reference since PHP 5. In `_get_custom_object_labels()`, cast `$object->labels` back to `object` before returning. This function is weird. 2015-09-14 01:22:23 +00:00
wpUniquePostSlug.php Tests: Permalink Structures Phase II: DRY up logic for setting permalink structures in test methods. 2015-10-03 20:54:11 +00:00