File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -244,11 +244,14 @@ public function test_get_global_path_upload_dir_if_matches_site_specific_dir() {
244244
245245 $ blogid1 = self ::factory ()->blog ->create ();
246246 switch_to_blog ( 2 );
247- wp_delete_site ( $ blogid1 );
248247
249- $ upload_path_base_dir = $ this ->paths ->get_upload_base_dir ();
248+ try {
249+ $ upload_path_base_dir = $ this ->paths ->get_upload_base_dir ();
250250
251- $ global_upload_path = $ this ->paths ->get_global_path_upload_dir_if_matches_site_specific_dir ( $ upload_path_base_dir );
252- $ this ->assertEquals ( ABSPATH . 'wp-content/uploads/ ' , $ global_upload_path );
251+ $ global_upload_path = $ this ->paths ->get_global_path_upload_dir_if_matches_site_specific_dir ( $ upload_path_base_dir );
252+ $ this ->assertEquals ( ABSPATH . 'wp-content/uploads/ ' , $ global_upload_path );
253+ } finally {
254+ wp_delete_site ( $ blogid1 );
255+ }
253256 }
254257}
You can’t perform that action at this time.
0 commit comments