Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/xmlwriter/tests/010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ var_dump(xmlwriter_end_attribute($xw));
try {
xmlwriter_start_attribute($xw, "-1");
} catch (ValueError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

var_dump(xmlwriter_end_attribute($xw));

try {
xmlwriter_start_attribute($xw, "\"");
} catch (ValueError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

var_dump(xmlwriter_end_attribute($xw));
Expand All @@ -45,9 +45,9 @@ echo "Done\n";
bool(true)
bool(true)
bool(true)
xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, "-1" given
ValueError: xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, "-1" given
bool(false)
xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, """ given
ValueError: xmlwriter_start_attribute(): Argument #2 ($name) must be a valid attribute name, """ given
bool(false)
bool(true)
string(14) "<tag attr=""/>"
Expand Down
2 changes: 1 addition & 1 deletion ext/xmlwriter/tests/gh21682.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ try {
serialize($w);
echo "ERROR: should have thrown\n";
} catch (\Exception $e) {
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Expand Down
4 changes: 2 additions & 2 deletions ext/xmlwriter/tests/xmlwriter_open_uri_error_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ xmlwriter
try {
xmlwriter_open_uri('');
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}
?>
--CREDITS--
Koen Kuipers koenk82@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--EXPECT--
xmlwriter_open_uri(): Argument #1 ($uri) must not be empty
ValueError: xmlwriter_open_uri(): Argument #1 ($uri) must not be empty
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class CustomXMLWriter extends XMLWriter {
try {
CustomXMLWriter::toMemory();
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
nope
Error: nope
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ $h = fopen("php://output", "w");
try {
CustomXMLWriter::toStream($h);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
nope
Error: nope
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ fclose($h);
try {
XMLWriter::toStream($h);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
XMLWriter::toStream(): supplied resource is not a valid stream resource
TypeError: XMLWriter::toStream(): supplied resource is not a valid stream resource
Loading