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