From 8bcf725a7ecf6faf74d9f8b05082f13646b9f755 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Thu, 22 Sep 2022 00:41:06 +0200 Subject: [PATCH] fix tests and add code for faster debugging next time --- tests/Internal/Codebase/InternalCallMapHandlerTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index 2f02ad18355..4f97351a028 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -51,11 +51,11 @@ class InternalCallMapHandlerTest extends TestCase private static $ignoredFunctions = [ 'apcu_entry', 'array_multisort', - 'count', // #8346 'bcdiv', 'bcmod', 'bcpowmod', 'bzdecompress', + 'count', // #8346 'crypt', 'date_isodate_set', 'debug_zval_dump', @@ -520,7 +520,13 @@ public function testIgnoresAreSortedAndUnique(): void /** @var string */ $function = is_int($key) ? $value : $key; - $this->assertGreaterThan(0, strcmp($function, $previousFunction)); + $diff = strcmp($function, $previousFunction); + if ($diff <= 0) { + // faster debugging errors in tests + echo PHP_EOL . $previousFunction . PHP_EOL . $function . PHP_EOL; + } + + $this->assertGreaterThan(0, $diff); $previousFunction = $function; } }