Opened 8 years ago
Closed 8 years ago
#38574 closed defect (bug) (fixed)
Tests: Remove uploads added by REST API media tests
Reported by: | jnylen0 | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Build/Test Tools | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Before this change, running the WP_REST_Attachments_Controller
tests multiple times in a row fails because these tests do not clean up their uploaded files. I do not see this error when running the full suite and I'm not sure why, but these files should still be cleaned up.
Here is the error that happens on the 2nd run of these tests:
$ phpunit --filter WP_Test_REST_Attachments_Controller Installing... Running as single site... To run multisite, use -c tests/phpunit/multisite.xml Not running ajax tests. To execute these, use --group ajax. Not running ms-files tests. To execute these, use --group ms-files. Not running external-http tests. To execute these, use --group external-http. PHPUnit 4.8.22 by Sebastian Bergmann and contributors. .....................................F........................ Time: 4.9 seconds, Memory: 172.25Mb There was 1 failure: 1) WP_Test_REST_Attachments_Controller::test_create_item_default_filename_title Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'codeispoetry' +'codeispoetry-1'
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
This happens in other tests too. See #38264.