From a886e161f366818e4e1d66b2deb9375c1ad538c0 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Tue, 7 Feb 2017 22:27:57 +0700 Subject: [PATCH] Fixed PHPUnit temp files --- src/PHPCensor/Plugin/PhpUnit.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PHPCensor/Plugin/PhpUnit.php b/src/PHPCensor/Plugin/PhpUnit.php index ec8c22b8..430662ed 100644 --- a/src/PHPCensor/Plugin/PhpUnit.php +++ b/src/PHPCensor/Plugin/PhpUnit.php @@ -119,8 +119,10 @@ class PhpUnit extends Plugin implements ZeroConfigPluginInterface { $options = clone $this->options; + $buildPath = $this->build->getBuildPath() . DIRECTORY_SEPARATOR; + // Save the results into a json file - $jsonFile = tempnam(RUNTIME_DIR, 'jLog_'); + $jsonFile = @tempnam($buildPath, 'jLog_'); $options->addArgument('log-json', $jsonFile); // Removes any current configurations files @@ -145,10 +147,10 @@ class PhpUnit extends Plugin implements ZeroConfigPluginInterface protected function runConfigFile($configFile) { $options = clone $this->options; - $buildPath = $this->build->getBuildPath(); + $buildPath = $this->build->getBuildPath() . DIRECTORY_SEPARATOR; // Save the results into a json file - $jsonFile = tempnam(RUNTIME_DIR, 'jLog_'); + $jsonFile = @tempnam($buildPath, 'jLog_'); $options->addArgument('log-json', $jsonFile); // Removes any current configurations files