From 705faa4898fba64711ab3ba5bbb5ae0b08964021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Mon, 22 Apr 2024 20:29:56 +0200 Subject: [PATCH] Do not crash when test run in child process ends unexpectedly and `--log-junit` is used --- src/Logging/JUnit/JunitXmlLogger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logging/JUnit/JunitXmlLogger.php b/src/Logging/JUnit/JunitXmlLogger.php index ec173aff411..7347bb07094 100644 --- a/src/Logging/JUnit/JunitXmlLogger.php +++ b/src/Logging/JUnit/JunitXmlLogger.php @@ -202,7 +202,7 @@ public function testPrepared(): void */ public function testFinished(Finished $event): void { - if ($this->preparationFailed) { + if (!$this->prepared || $this->preparationFailed) { return; }