~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/unit/engine/ArcanistTestResultParser.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

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