1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/uri/tests/rfc3986/modification/scheme_error_empty.phpt
Tim Düsterhus a22793db2b uri: Unify exception testing for modification tests (#20368)
Catch any Throwable and print the exact class name.
2025-11-02 22:44:25 +01:00

19 lines
353 B
PHP

--TEST--
Test Uri\Rfc3986\Uri component modification - scheme - empty string
--EXTENSIONS--
uri
--FILE--
<?php
$uri = Uri\Rfc3986\Uri::parse("https://example.com");
try {
$uri->withScheme("");
} catch (Throwable $e) {
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Uri\InvalidUriException: The specified scheme is malformed