Wordpress/tests/phpunit/includes
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
..
bootstrap.php HTTP timeouts should cause some tests to be skipped, not failed 2015-10-06 03:36:18 +00:00
exceptions.php
factory.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
functions.php During PHPUnit tests, don't autodetect permalink structure during WP installation. 2015-04-16 23:59:01 +00:00
install.php Set $_SERVER['REQUEST_METHOD'] for unit tests. 2015-06-16 00:03:25 +00:00
mock-fs.php
mock-image-editor.php
mock-mailer.php Update PHPMailer to 5.2.10 from 5.2.7. 2015-07-08 17:15:02 +00:00
testcase-ajax.php
testcase-canonical.php Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown(). 2015-10-03 17:14:12 +00:00
testcase-xmlrpc.php
testcase.php Use wp_installing() instead of WP_INSTALLING constant. 2015-10-05 15:05:26 +00:00
trac.php
utils.php Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown(). 2015-10-03 17:14:12 +00:00
wp-profiler.php Remove PHP4 constructors from Unit Tests 2015-07-08 16:04:11 +00:00