[wp-trac] [WordPress Trac] #38264: Tests: Uploads aren't deleted after running individual tests
WordPress Trac
noreply at wordpress.org
Thu Sep 28 09:03:11 UTC 2017
#38264: Tests: Uploads aren't deleted after running individual tests
-------------------------------------+------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Media | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+------------------
Comment (by birgire):
Just stumbled on this issue when writing a test yesterday, for a patch in
#22101, for gallery shortcode output in feeds.
https://core.trac.wordpress.org/ticket/22101#comment:11
{{{
... I noticed that the test in
test_wp_get_attachment_image_should_use_wp_get_attachment_metadata()
can only run once, because the filename gets an increasing index, like
test-image-large-{$i}-150x150.png
in the srcset, where $i > 2 is the number of times we run the
/tests/phpunit/tests/media.php tests. Looks
like we might need a better cleanup there?
I tried to avoid this in the above test by not referring to the exact
filename for self::$large_id, as
it would also get the same increasing index for repeated test runs.
}}}
Was just about to create a ticket for this, when I found this one ;-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38264#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list