Exemplo n.º 1
0
 /**
  * @param PHPUnitConfig $configFile
  * @param string | null $testSuiteFilter
  *
  * @return array
  */
 public function filterTestFiles(PHPUnitConfig $configFile, $testSuiteFilter = null)
 {
     $aggregatedFiles = array();
     $this->relativePath = $configFile->getDirectory() . DIRECTORY_SEPARATOR;
     $document = $this->utilXml->loadFile($configFile->getFileFullPath(), false, true, true);
     $xpath = new \DOMXPath($document);
     /** @var \DOMNode $testSuiteNode */
     foreach ($xpath->query('testsuites/testsuite') as $testSuiteNode) {
         if (is_null($testSuiteFilter) || $testSuiteFilter == $this->getDOMNodeAttribute($testSuiteNode, 'name')) {
             $this->addTestsFromTestSuite($testSuiteNode, $aggregatedFiles);
         }
     }
     return array_values($aggregatedFiles);
 }
Exemplo n.º 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);
 }