Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/ArcanistBaseTestResultParser.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Abstract Base class for test result parsers | * Abstract Base class for test result parsers. | ||||
| */ | */ | ||||
| abstract class ArcanistBaseTestResultParser { | abstract class ArcanistBaseTestResultParser { | ||||
| protected $enableCoverage; | protected $enableCoverage; | ||||
| protected $projectRoot; | protected $projectRoot; | ||||
| protected $coverageFile; | protected $coverageFile; | ||||
| protected $stderr; | protected $stderr; | ||||
| public function setEnableCoverage($enable_coverage) { | public function setEnableCoverage($enable_coverage) { | ||||
| $this->enableCoverage = $enable_coverage; | $this->enableCoverage = $enable_coverage; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setProjectRoot($project_root) { | public function setProjectRoot($project_root) { | ||||
| $this->projectRoot = $project_root; | $this->projectRoot = $project_root; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setCoverageFile($coverage_file) { | public function setCoverageFile($coverage_file) { | ||||
| $this->coverageFile = $coverage_file; | $this->coverageFile = $coverage_file; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setAffectedTests($affected_tests) { | public function setAffectedTests($affected_tests) { | ||||
| $this->affectedTests = $affected_tests; | $this->affectedTests = $affected_tests; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setStderr($stderr) { | public function setStderr($stderr) { | ||||
| $this->stderr = $stderr; | $this->stderr = $stderr; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| /** | /** | ||||
| * Parse test results from provided input and return an array | * Parse test results from provided input and return an array | ||||
| * of ArcanistUnitTestResult | * of ArcanistUnitTestResult | ||||
| * | * | ||||
| * @param string $path Path to test | * @param string $path Path to test | ||||
| * @param string $test_results String containing test results | * @param string $test_results String containing test results | ||||
| * | * | ||||
| * @return array ArcanistUnitTestResult | * @return array ArcanistUnitTestResult | ||||
| */ | */ | ||||
| abstract public function parseTestResults($path, $test_results); | abstract public function parseTestResults($path, $test_results); | ||||
| } | } | ||||