Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13993885
D7952.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7952.diff
View Options
Index: src/unit/ArcanistUnitTestResult.php
===================================================================
--- src/unit/ArcanistUnitTestResult.php
+++ src/unit/ArcanistUnitTestResult.php
@@ -14,6 +14,7 @@
const RESULT_UNSOUND = 'unsound';
const RESULT_POSTPONED = 'postponed';
+ private $namespace;
private $name;
private $link;
private $result;
@@ -22,6 +23,15 @@
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;
Index: src/unit/engine/phutil/ArcanistPhutilTestCase.php
===================================================================
--- src/unit/engine/phutil/ArcanistPhutilTestCase.php
+++ src/unit/engine/phutil/ArcanistPhutilTestCase.php
@@ -396,6 +396,7 @@
$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);
Index: src/unit/renderer/ArcanistUnitConsoleRenderer.php
===================================================================
--- src/unit/renderer/ArcanistUnitConsoleRenderer.php
+++ src/unit/renderer/ArcanistUnitConsoleRenderer.php
@@ -12,10 +12,17 @@
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";
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 2:02 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6745647
Default Alt Text
D7952.diff (2 KB)
Attached To
Mode
D7952: Added test namespace field to `ArcanistUnitTestResult`
Attached
Detach File
Event Timeline
Log In to Comment