mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -80,10 +80,10 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control
|
||||
$role->add_cap( 'level_0' );
|
||||
|
||||
$orig_file = DIR_TESTDATA . '/images/canola.jpg';
|
||||
$this->test_file = '/tmp/canola.jpg';
|
||||
$this->test_file = get_temp_dir() . 'canola.jpg';
|
||||
copy( $orig_file, $this->test_file );
|
||||
$orig_file2 = DIR_TESTDATA . '/images/codeispoetry.png';
|
||||
$this->test_file2 = '/tmp/codeispoetry.png';
|
||||
$this->test_file2 = get_temp_dir() . 'codeispoetry.png';
|
||||
copy( $orig_file2, $this->test_file2 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user