| @@ 229-246 (lines=18) @@ | ||
| 226 | * @param string $message |
|
| 227 | * @param Test|TestCase|null $test |
|
| 228 | */ |
|
| 229 | private function writeCase(string $status, float $time, string $trace, $message = '', $test = null) |
|
| 230 | { |
|
| 231 | $output = ''; |
|
| 232 | if ($test instanceof TestCase) { |
|
| 233 | $output = $test->getActualOutput(); |
|
| 234 | } |
|
| 235 | ||
| 236 | $this->writeArray([ |
|
| 237 | 'event' => 'test', |
|
| 238 | 'suite' => $this->currentTestSuiteName, |
|
| 239 | 'test' => $this->currentTestName, |
|
| 240 | 'status' => $status, |
|
| 241 | 'time' => $time, |
|
| 242 | 'trace' => $trace, |
|
| 243 | 'message' => $this->convertToUtf8($message), |
|
| 244 | 'output' => $output, |
|
| 245 | ]); |
|
| 246 | } |
|
| 247 | ||
| 248 | /** |
|
| 249 | * @param array $buffer |
|
| @@ 240-257 (lines=18) @@ | ||
| 237 | * @param string $message |
|
| 238 | * @param Test|TestCase|null $test |
|
| 239 | */ |
|
| 240 | private function writeCase(string $status, float $time, string $trace, $message = '', $test = null) |
|
| 241 | { |
|
| 242 | $output = ''; |
|
| 243 | if ($test instanceof TestCase) { |
|
| 244 | $output = $test->getActualOutput(); |
|
| 245 | } |
|
| 246 | ||
| 247 | $this->writeArray([ |
|
| 248 | 'event' => 'test', |
|
| 249 | 'suite' => $this->currentTestSuiteName, |
|
| 250 | 'test' => $this->currentTestName, |
|
| 251 | 'status' => $status, |
|
| 252 | 'time' => $time, |
|
| 253 | 'trace' => $trace, |
|
| 254 | 'message' => $this->convertToUtf8($message), |
|
| 255 | 'output' => $output, |
|
| 256 | ]); |
|
| 257 | } |
|
| 258 | ||
| 259 | /** |
|
| 260 | * @param array $buffer |
|