Skip to content

Commit

Permalink
Update the set_error_handler error message assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion authored and ondrejmirtes committed Feb 10, 2022
1 parent c344314 commit bd78291
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -37,6 +37,10 @@ public function testCallToFunctionWithoutParameters(): void

public function testCallToFunctionWithIncorrectParameters(): void
{
$setErrorHandlerError = PHP_VERSION_ID < 80000
? 'Parameter #1 $callback of function set_error_handler expects (callable(int, string, string, int, array): bool)|null, Closure(mixed, mixed, mixed, mixed): void given.'
: 'Parameter #1 $callback of function set_error_handler expects (callable(int, string, string, int): bool)|null, Closure(mixed, mixed, mixed, mixed): void given.';

require_once __DIR__ . '/data/incorrect-call-to-function-definition.php';
$this->analyse([__DIR__ . '/data/incorrect-call-to-function.php'], [
[
Expand All @@ -52,7 +56,7 @@ public function testCallToFunctionWithIncorrectParameters(): void
14,
],
[
'Parameter #1 $callback of function set_error_handler expects (callable(int, string, string, int, array): bool)|null, Closure(mixed, mixed, mixed, mixed): void given.',
$setErrorHandlerError,
16,
],
]);
Expand Down

0 comments on commit bd78291

Please sign in to comment.