diff --git a/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt index 4b3c3dd00a99e..1afde4151ac69 100644 --- a/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/fragment_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withFragment("#fragment"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified fragment is malformed +Uri\InvalidUriException: The specified fragment is malformed diff --git a/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt index bbb1e2ffe8727..5d6cf1198c9c0 100644 --- a/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/fragment_error_unicode.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withFragment("ő"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified fragment is malformed +Uri\InvalidUriException: The specified fragment is malformed diff --git a/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt index 81d60bc2e400b..ca87c1a3ce266 100644 --- a/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/host_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withHost("ex#mple.com"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed +Uri\InvalidUriException: The specified host is malformed diff --git a/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt index 2da84e2689b3b..e883a7daed19e 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("/[foo]"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified path is malformed +Uri\InvalidUriException: The specified path is malformed diff --git a/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt index 9335132dad56c..5fc836533ca11 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_unicode.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("/ő"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified path is malformed +Uri\InvalidUriException: The specified path is malformed diff --git a/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt b/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt index 476e4ec873c28..b6f66bdb5e44c 100644 --- a/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt +++ b/ext/uri/tests/rfc3986/modification/path_error_without_leading_slash.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPath("foo"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified path is malformed +Uri\InvalidUriException: The specified path is malformed diff --git a/ext/uri/tests/rfc3986/modification/port_error_negative.phpt b/ext/uri/tests/rfc3986/modification/port_error_negative.phpt index 598475b1e1845..b8a25ee766673 100644 --- a/ext/uri/tests/rfc3986/modification/port_error_negative.phpt +++ b/ext/uri/tests/rfc3986/modification/port_error_negative.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withPort(-1); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified port is malformed +Uri\InvalidUriException: The specified port is malformed diff --git a/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt index f09e867a0210f..d7f9745e9ef75 100644 --- a/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/query_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withQuery("#foo"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified query is malformed +Uri\InvalidUriException: The specified query is malformed diff --git a/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt b/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt index c8f5100597429..964e6b36d72bc 100644 --- a/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt +++ b/ext/uri/tests/rfc3986/modification/query_error_unicode.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withQuery("ő"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified query is malformed +Uri\InvalidUriException: The specified query is malformed diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt index 477be1d2331c6..94888c446f690 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme(""); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\InvalidUriException: The specified scheme is malformed diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt index 683f46cc42a83..e44e8df85ed0d 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_encoded.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme("http%73"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\InvalidUriException: The specified scheme is malformed diff --git a/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt index dd3bcc02f83e3..7d235e56d113e 100644 --- a/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/scheme_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withScheme("https:"); -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\InvalidUriException: The specified scheme is malformed diff --git a/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt b/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt index a5f820b0d59f1..c416ea43eb730 100644 --- a/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt +++ b/ext/uri/tests/rfc3986/modification/userinfo_error_reserved.phpt @@ -9,10 +9,10 @@ $uri = Uri\Rfc3986\Uri::parse("https://example.com"); try { $uri->withUserInfo("us/r:password"); // us/r:password -} catch (Uri\InvalidUriException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified userinfo is malformed +Uri\InvalidUriException: The specified userinfo is malformed diff --git a/ext/uri/tests/whatwg/modification/host_error_empty.phpt b/ext/uri/tests/whatwg/modification/host_error_empty.phpt index f9f4739578604..7ce0fa9dff2b0 100644 --- a/ext/uri/tests/whatwg/modification/host_error_empty.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_empty.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withHost(""); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed (HostMissing) +Uri\WhatWg\InvalidUrlException: The specified host is malformed (HostMissing) diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt index 8aebc5f7057df..a6ef7e6a5d5d4 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_opaque1.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("foo://example.com"); try { $url = $url->withHost("ex@mple.com"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed (HostInvalidCodePoint) +Uri\WhatWg\InvalidUrlException: The specified host is malformed (HostInvalidCodePoint) diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt index a27c26381b4e5..d06234d949b85 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special1.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex@mple.com"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed (DomainInvalidCodePoint) +Uri\WhatWg\InvalidUrlException: The specified host is malformed (DomainInvalidCodePoint) diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt index a0626d99c51a6..4413802fdb9ef 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special2.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex:mple.com"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed +Uri\WhatWg\InvalidUrlException: The specified host is malformed diff --git a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt index a0626d99c51a6..4413802fdb9ef 100644 --- a/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_forbidden_host_codepoint_special3.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost("ex:mple.com"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed +Uri\WhatWg\InvalidUrlException: The specified host is malformed diff --git a/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt b/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt index ca5d5a0201d7c..627fe8d3e5887 100644 --- a/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt +++ b/ext/uri/tests/whatwg/modification/host_error_unset_existing.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url = $url->withHost(null); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified host is malformed (HostMissing) +Uri\WhatWg\InvalidUrlException: The specified host is malformed (HostMissing) diff --git a/ext/uri/tests/whatwg/modification/port_error_negative.phpt b/ext/uri/tests/whatwg/modification/port_error_negative.phpt index 5de87d7e76088..27e29995ce35b 100644 --- a/ext/uri/tests/whatwg/modification/port_error_negative.phpt +++ b/ext/uri/tests/whatwg/modification/port_error_negative.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withPort(-1); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified port is malformed +Uri\WhatWg\InvalidUrlException: The specified port is malformed diff --git a/ext/uri/tests/whatwg/modification/port_error_too_large.phpt b/ext/uri/tests/whatwg/modification/port_error_too_large.phpt index 4060056b0a565..f530b36721639 100644 --- a/ext/uri/tests/whatwg/modification/port_error_too_large.phpt +++ b/ext/uri/tests/whatwg/modification/port_error_too_large.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withPort(65536); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified port is malformed (PortOutOfRange) +Uri\WhatWg\InvalidUrlException: The specified port is malformed (PortOutOfRange) diff --git a/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt b/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt index 0460fa72945f6..5e3525de7d94f 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_empty.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme(""); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\WhatWg\InvalidUrlException: The specified scheme is malformed diff --git a/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt b/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt index a52dc65dadd8a..bda1ac497e25d 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_encoded.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme("http%73"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\WhatWg\InvalidUrlException: The specified scheme is malformed diff --git a/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt b/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt index 21cd04346a3c3..ad98af24e4afd 100644 --- a/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt +++ b/ext/uri/tests/whatwg/modification/scheme_error_invalid.phpt @@ -9,10 +9,10 @@ $url = Uri\WhatWg\Url::parse("https://example.com"); try { $url->withScheme("http?"); -} catch (Uri\WhatWg\InvalidUrlException $e) { - echo $e->getMessage() . "\n"; +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), PHP_EOL; } ?> --EXPECT-- -The specified scheme is malformed +Uri\WhatWg\InvalidUrlException: The specified scheme is malformed