diff --git a/tests/phpunit/tests/file.php b/tests/phpunit/tests/file.php index a633970053..8ee3e8de20 100644 --- a/tests/phpunit/tests/file.php +++ b/tests/phpunit/tests/file.php @@ -7,7 +7,10 @@ class Tests_File extends WP_UnitTestCase { function setUp() { parent::setUp(); - $this->dir = dirname(tempnam('/tmp', 'foo')); + + $file = tempnam( '/tmp', 'foo') ; + $this->dir = dirname( $file ); + unlink( $file ); $this->badchars = '"\'[]*&?$'; }