Пример #1
0
 /**
  * @param ParaunitProcessInterface $process
  * @return array | \stdClass[]
  */
 public function fetch(ParaunitProcessInterface $process)
 {
     $filePath = $this->fileName->getFilenameForLog($process->getUniqueId());
     $fileContent = '';
     if (file_exists($filePath)) {
         $fileContent = file_get_contents($filePath);
         unlink($filePath);
     }
     $logs = json_decode($this->cleanLog($fileContent));
     $logs[] = $this->createLogEnding();
     return $logs;
 }
Пример #2
0
 /**
  * @param PHPUnitConfig $config
  * @param string $uniqueId
  * @return string
  */
 public function getOptions(PHPUnitConfig $config, $uniqueId)
 {
     return '-c ' . $config->getFileFullPath() . ' --log-json ' . $this->filenameFactory->getFilenameForLog($uniqueId) . $this->createOptionsString($config);
 }