Make WordPress Core


Ignore:
Timestamp:
07/14/2020 01:28:17 AM (5 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/file.php

    r47122 r48464  
    99        parent::setUp();
    1010
    11         $file      = tempnam( '/tmp', 'foo' );
    12         $this->dir = dirname( $file );
    13         unlink( $file );
     11        $this->dir = untrailingslashit( get_temp_dir() );
    1412
    1513        $this->badchars = '"\'[]*&?$';
Note: See TracChangeset for help on using the changeset viewer.