From 6413c1efcec1bbadfbc0b4b8e1b931ae3a886828 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Sun, 30 Oct 2016 23:31:06 +0000 Subject: [PATCH] REST API: Delete temporary files during teardown of `WP_Test_REST_Attachments_Controller`. Props jnylen0. Fixes #38574. git-svn-id: https://develop.svn.wordpress.org/trunk@39041 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rest-api/rest-attachments-controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/rest-api/rest-attachments-controller.php b/tests/phpunit/tests/rest-api/rest-attachments-controller.php index 0f43bf3145..79603127f0 100644 --- a/tests/phpunit/tests/rest-api/rest-attachments-controller.php +++ b/tests/phpunit/tests/rest-api/rest-attachments-controller.php @@ -849,6 +849,8 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control if ( file_exists( $this->test_file2 ) ) { unlink( $this->test_file2 ); } + + $this->remove_added_uploads(); } protected function check_post_data( $attachment, $data, $context = 'view', $links ) {