Make WordPress Core


Ignore:
Timestamp:
07/14/2020 01:28:17 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r48438 r48464  
    6161
    6262        $orig_file       = DIR_TESTDATA . '/images/canola.jpg';
    63         $this->test_file = '/tmp/canola.jpg';
     63        $this->test_file = get_temp_dir() . 'canola.jpg';
    6464        copy( $orig_file, $this->test_file );
    6565        $orig_file2       = DIR_TESTDATA . '/images/waffles.jpg';
    66         $this->test_file2 = '/tmp/waffles.jpg';
     66        $this->test_file2 = get_temp_dir() . 'waffles.jpg';
    6767        copy( $orig_file2, $this->test_file2 );
    6868    }
Note: See TracChangeset for help on using the changeset viewer.