Skip to content

Commit

Permalink
fix tests and add code for faster debugging next time
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Sep 21, 2022
1 parent 0d80470 commit 75ddfbe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/Internal/Codebase/InternalCallMapHandlerTest.php
Expand Up @@ -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',
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 75ddfbe

Please sign in to comment.