From 75ddfbe0bef5b2da03c0e21048f1404b8d6271dd 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 4effb9f8b80..4502d821956 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', @@ -519,7 +519,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; } }