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