Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2681182
D25300.1734638260.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25300.1734638260.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25300: Fix strlen() being passed a null in ArcanistUnitConsoleRenderer.php
Attached
Detach File
Event Timeline
Log In to Comment