From c2b86c3ab3e5517564532d8dcb2dc12e1726367d Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 30 Jul 2021 16:34:30 +0100 Subject: [PATCH] Removes pest from stack traces --- src/Logging/TeamCity.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Logging/TeamCity.php b/src/Logging/TeamCity.php index d763c6ec..8ff92b6f 100644 --- a/src/Logging/TeamCity.php +++ b/src/Logging/TeamCity.php @@ -333,6 +333,8 @@ final class TeamCity extends DefaultResultPrinter public function addWarning(Test $test, Warning $e, float $time): void { $this->lastTestFailed = true; + + $this->removePestFromStackTrace($e); $this->writeWarning($test, $e); } @@ -344,18 +346,24 @@ final class TeamCity extends DefaultResultPrinter public function addIncompleteTest(Test $test, Throwable $t, float $time): void { $this->lastTestFailed = true; + + $this->removePestFromStackTrace($t); $this->writeWarning($test, $t); } public function addRiskyTest(Test $test, Throwable $t, float $time): void { $this->lastTestFailed = true; + + $this->removePestFromStackTrace($t); $this->writeWarning($test, $t); } public function addSkippedTest(Test $test, Throwable $t, float $time): void { $this->lastTestFailed = true; + + $this->removePestFromStackTrace($t); $this->writeWarning($test, $t); $this->phpunitTeamCity->printIgnoredTest($test->getName(), $t, $time); }