From f8a654851029b5d808f3ae1c5c82404c1ff4e885 Mon Sep 17 00:00:00 2001 From: Kazuki Yamada Date: Sun, 24 Sep 2023 22:58:31 +0900 Subject: [PATCH] fix: test --- tests/FriendlyErrorFormatterTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/FriendlyErrorFormatterTest.php b/tests/FriendlyErrorFormatterTest.php index fc8b2fa..f6dfa70 100644 --- a/tests/FriendlyErrorFormatterTest.php +++ b/tests/FriendlyErrorFormatterTest.php @@ -236,13 +236,19 @@ private function getDummyAnalysisResult(int $numFileErrors, int $numGenericError return new \PHPStan\Command\AnalysisResult($fileErrors, $genericErrors, [], $warnings, false, null, true); } - // compatibility to less than 1.11.0 + // compatibility to less than 1.9.0 if (8 === $numOfParams) { // @phpstan-ignore-next-line return new \PHPStan\Command\AnalysisResult($fileErrors, $genericErrors, [], $warnings, [], false, null, true); } + // compatibility to less than 1.10.34 + if (9 === $numOfParams) { + // @phpstan-ignore-next-line + return new \PHPStan\Command\AnalysisResult($fileErrors, $genericErrors, [], $warnings, [], false, null, true, memory_get_peak_usage(true)); + } + // @phpstan-ignore-next-line - return new \PHPStan\Command\AnalysisResult($fileErrors, $genericErrors, [], $warnings, [], false, null, true, memory_get_peak_usage(true)); + return new \PHPStan\Command\AnalysisResult($fileErrors, $genericErrors, [], $warnings, [], false, null, true, memory_get_peak_usage(true), false); } }