Skip to content
This repository was archived by the owner on Mar 26, 2021. It is now read-only.

Commit 66f9826

Browse files
committed
Fix data set message output
1 parent 0a3ce94 commit 66f9826

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Markdown.php

100644100755
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,19 @@ private function getTestResultInfo( string $testNameWithDataSet, string $result,
322322
$matches = [];
323323
preg_match( '#^([^\#]+)(?: with data set \#(\d+))?$#', $testNameWithDataSet, $matches );
324324

325+
$dataSet = $matches[2] ?? null;
326+
325327
return [
326328
'testName' => $matches[1],
327-
'dataSet' => $matches[2] ?? 0,
329+
'dataSet' => $dataSet ?? 0,
328330
'result' => $result,
329-
'message' => $message,
331+
'message' => (null !== $message)
332+
? sprintf(
333+
'%s%s',
334+
(null !== $dataSet) ? "{$dataSet}: " : '',
335+
$message
336+
)
337+
: null,
330338
];
331339
}
332340

0 commit comments

Comments
 (0)