[wp-trac] [WordPress Trac] #36246: wp_get_attachment_image should use wp_get_attachment_metadata
WordPress Trac
noreply at wordpress.org
Mon Aug 22 00:57:34 UTC 2016
#36246: wp_get_attachment_image should use wp_get_attachment_metadata
-----------------------------+-----------------------------
Reporter: JorritSchippers | Owner: wonderboymusic
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.7
Component: Media | Version: 4.4.2
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------------
Changes (by pento):
* keywords: has-patch has-unit-tests =>
* status: closed => reopened
* resolution: fixed =>
Comment:
The unit tests for this are failing.
{{{
1)
Tests_Media::test_wp_get_attachment_image_should_use_wp_get_attachment_metadata
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-<img width="999" height="999" src="http://example.org/wp-
content/uploads/2016/03/test-image-testsize-999x999.png" class
="attachment-testsize size-testsize" alt="test-image-large.png"
srcset="http://example.org/wp-content/uploads/2016/03/test-image-large-
150x150.png 150w, http://example.org/wp-content/uploads/2016/03/test-
image-testsize-999x999.png 999w" sizes="(max-width: 999px) 100vw, 999px"
/>
+<img width="999" height="999" src="http://example.org/wp-
content/uploads/2016/08/test-image-testsize-999x999.png" class
="attachment-testsize size-testsize" alt="test-image-large.png"
srcset="http://example.org/wp-content/uploads/2016/08/test-image-testsize-
999x999.png 999w, http://example.org/wp-content/uploads/2016/08/test-
image-large-150x150.png 150w" sizes="(max-width: 709px) 85vw, (max-width:
909px) 67vw, (max-width: 1362px) 62vw, 840px" />
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36246#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list