Page MenuHomePhorge

D25300.1734638260.diff
No OneTemporary

D25300.1734638260.diff

diff --git a/src/unit/__tests__/ArcanistUnitTestResultTestCase.php b/src/unit/__tests__/ArcanistUnitTestResultTestCase.php
--- a/src/unit/__tests__/ArcanistUnitTestResultTestCase.php
+++ b/src/unit/__tests__/ArcanistUnitTestResultTestCase.php
@@ -40,4 +40,17 @@
}
}
+ public function testRenderer() {
+ $result = new ArcanistUnitTestResult();
+ $result->setName('RendererTest');
+ $result->setResult('pass');
+ $result->setDuration(0.001);
+ $result->setUserData('');
+
+ $renderer = new ArcanistUnitConsoleRenderer();
+ $output = $renderer->renderUnitResult($result);
+ $test_dscr = 'Renderer copes with null namespace';
+ $this->assertTrue((bool)preg_match('/PASS/', $output), $test_dscr);
+ }
+
}
diff --git a/src/unit/renderer/ArcanistUnitConsoleRenderer.php b/src/unit/renderer/ArcanistUnitConsoleRenderer.php
--- a/src/unit/renderer/ArcanistUnitConsoleRenderer.php
+++ b/src/unit/renderer/ArcanistUnitConsoleRenderer.php
@@ -12,7 +12,7 @@
$test_name = $result->getName();
$test_namespace = $result->getNamespace();
- if (strlen($test_namespace)) {
+ if (phutil_nonempty_string($test_namespace)) {
$test_name = $test_namespace.'::'.$test_name;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 19:57 (40 m, 43 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015466
Default Alt Text
D25300.1734638260.diff (1 KB)

Event Timeline