diff --git a/tests/func_015.phpt b/tests/func_015.phpt index 067634d..944cf09 100644 --- a/tests/func_015.phpt +++ b/tests/func_015.phpt @@ -35,6 +35,11 @@ foreach (['', (object) [], '1234', 4.5, true, new \DateTimeImmutable(), new \Dat } catch (TypeError $e) { $message = $e->getMessage(); + if (PHP_VERSION_ID >= 80300) { + // PHP 8.3+ outputs "true given" instead of "bool given". + $message = str_replace('true given', 'bool given', $message); + } + // Workaround exception message not including type in PHP 7 so the same test can be used for both. if (PHP_MAJOR_VERSION === 7) { $message = str_replace('N/A given', var_type($input).' given', $message); diff --git a/tests/func_016.phpt b/tests/func_016.phpt index 6a024b7..75e5b5e 100644 --- a/tests/func_016.phpt +++ b/tests/func_016.phpt @@ -35,6 +35,11 @@ foreach (['', (object) [], '1234', 4.5, true, new \DateTimeImmutable(), new \Dat } catch (TypeError $e) { $message = $e->getMessage(); + if (PHP_VERSION_ID >= 80300) { + // PHP 8.3+ outputs "true given" instead of "bool given". + $message = str_replace('true given', 'bool given', $message); + } + // Workaround exception message not including type in PHP 7 so the same test can be used for both. if (PHP_MAJOR_VERSION === 7) { $message = str_replace('N/A given', var_type($input).' given', $message); diff --git a/tests/func_017.phpt b/tests/func_017.phpt index c53e21e..074598b 100644 --- a/tests/func_017.phpt +++ b/tests/func_017.phpt @@ -24,5 +24,5 @@ timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be o timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be of type) (integer|int), (object|stdClass) given timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be of type) (integer|int), string given timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be of type) (integer|int), float given -timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be of type) (integer|int), (bool|boolean) given +timecop_scale\(\)( expects parameter 1 to be|: Argument #1 \(\$scale\) must be of type) (integer|int), (bool|boolean|true) given bool\(false\)