Fixed PHPUnit temp files

This commit is contained in:
Dmitry Khomutov 2017-02-07 22:27:57 +07:00
parent d0eceb9513
commit a886e161f3
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -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