Summary: See https://github.com/facebook/libphutil/issues/34
Test Plan: Run `arc unit`
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley
CC: Korvin, epriestley, aran
Differential Revision: https://secure.phabricator.com/D7952
const RESULT_UNSOUND = 'unsound';
const RESULT_POSTPONED = 'postponed';
+ private $namespace;
private $name;
private $link;
private $result;
private $extraData;
private $coverage;
+ public function setNamespace($namespace) {
+ $this->namespace = $namespace;
+ return $this;
+ }
+
+ public function getNamespace() {
+ return $this->namespace;
+ }
+
public function setName($name) {
$this->name = $name;
return $this;
$result = new ArcanistUnitTestResult();
$result->setCoverage($coverage);
+ $result->setNamespace(get_class($this));
$result->setName($this->runningTest);
$result->setLink($this->getLink($this->runningTest));
$result->setResult($test_result);
if ($result_code == ArcanistUnitTestResult::RESULT_PASS) {
$duration = ' '.$this->formatTestDuration($result->getDuration());
}
+
+ $test_name = $result->getName();
+ $test_namespace = $result->getNamespace();
+ if (strlen($test_namespace)) {
+ $test_name = $test_namespace.'::'.$test_name;
+ }
+
$return = sprintf(
" %s %s\n",
$this->getFormattedResult($result->getResult()).$duration,
- $result->getName());
+ $test_name);
if ($result_code != ArcanistUnitTestResult::RESULT_PASS) {
$return .= $result->getUserData()."\n";