[wp-trac] [WordPress Trac] #12235: Display caption with the_post_thumbnail
WordPress Trac
noreply at wordpress.org
Sun Jun 26 22:31:26 UTC 2016
#12235: Display caption with the_post_thumbnail
---------------------------------------------+-----------------------
Reporter: hd-J | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.6
Component: Post Thumbnails | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-----------------------
Comment (by joemcgill):
@flixos90 The tests look good. My only suggestion is that we probably
don't need to test the process of setting the caption in
`test_wp_get_attachment_caption()` and
`test_get_the_post_thumbnail_caption()`, and instead should focus on
whether the output is what we expect based on the attachment's excerpt
value, like you did with `test_the_post_thumbnail_caption()`.
If the goal there is to test whether an attachment with a blank excerpt
value will return false, we should do that in a separate test like
`test_wp_get_attachment_caption_empty()` rather than mixing two cases in
single tests. If you had something else in mind, feel free to clarify.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12235#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list