You appear to be a bot. Output may be restricted
Description
Returns the name of a temporary file
Usage
WP_UnitTestCase::temp_filename();
Parameters
Returns
voidSource
File name: oik-batch/tests/testcase.phpLines:
1 to 14 of 14
function temp_filename() { $tmp_dir = ''; $dirs = array( 'TMP', 'TMPDIR', 'TEMP' ); foreach( $dirs as $dir ) if ( isset( $_ENV[$dir] ) && !empty( $_ENV[$dir] ) ) { $tmp_dir = $dir; break; } if ( empty( $tmp_dir ) ) { $tmp_dir = '/tmp'; } $tmp_dir = realpath( $tmp_dir ); return tempnam( $tmp_dir, 'wpunit' ); }View on GitHub