mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-15 03:12:40 +01:00
47 lines
1,002 B
PHP
47 lines
1,002 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Abstract Base class for test result parsers
|
||
|
*/
|
||
|
abstract class ArcanistBaseTestResultParser {
|
||
|
|
||
|
protected $enableCoverage;
|
||
|
protected $projectRoot;
|
||
|
protected $coverateFile;
|
||
|
|
||
|
public function setEnableCoverage($enable_coverage) {
|
||
|
$this->enableCoverage = $enable_coverage;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function setProjectRoot($project_root) {
|
||
|
$this->projectRoot = $project_root;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function setCoverageFile($coverage_file) {
|
||
|
$this->coverageFile = $coverage_file;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function setAffectedTests($affected_tests) {
|
||
|
$this->affectedTests = $affected_tests;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Parse test results from provided input and return an array
|
||
|
* of ArcanistUnitTestResult
|
||
|
*
|
||
|
* @param string $path Path to test
|
||
|
* @param string $test_results String containing test results
|
||
|
*
|
||
|
* @return array ArcanistUnitTestResult
|
||
|
*/
|
||
|
abstract public function parseTestResults($path, $test_results);
|
||
|
}
|