Tests: Replace hardcoded /tmp/ references with get_temp_dir().

This allows more tests to pass on Windows.

Props danielhuesken, DJPaul, christophherr, joemcgill, netweb, davidbaumwald, SergeyBiryukov.
Fixes #40856, #39975.

git-svn-id: https://develop.svn.wordpress.org/trunk@48464 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-07-14 01:28:17 +00:00
parent 0ded98ff2c
commit 022ebde54d
10 changed files with 29 additions and 23 deletions

View File

@@ -226,7 +226,7 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
);
$media_id = $this->factory->attachment->create_object(
'/tmp/canola.jpg',
get_temp_dir() . 'canola.jpg',
0,
array(
'post_mime_type' => 'image/jpeg',