1<?php 2 3/** 4 * Abstract base class for test result parsers. 5 */ 6abstract class ArcanistTestResultParser extends Phobject { 7 8 protected $enableCoverage; 9 protected $projectRoot; 10 protected $coverageFile; 11 protected $stderr; 12 protected $affectedTests; 13 14 public function setEnableCoverage($enable_coverage) { 15 $this->enableCoverage = $enable_coverage; 16 return $this; 17 } 18 19 public function setProjectRoot($project_root) { 20 $this->projectRoot = $project_root; 21 return $this; 22 } 23 24 public function setCoverageFile($coverage_file) { 25 $this->coverageFile = $coverage_file; 26 return $this; 27 } 28 29 public function setAffectedTests($affected_tests) { 30 $this->affectedTests = $affected_tests; 31 return $this; 32 } 33 34 public function setStderr($stderr) { 35 $this->stderr = $stderr; 36 return $this; 37 } 38 39 /** 40 * Parse test results from provided input and return an array of 41 * @{class:ArcanistUnitTestResult}. 42 * 43 * @param string Path to test. 44 * @param string String containing test results. 45 * @return array 46 */ 47 abstract public function parseTestResults($path, $test_results); 48 49} 50