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
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug31755.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $client = new MySoapClient(null, array(
try {
new SOAPHeader('', 'foo', 'bar');
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}

$header = new SOAPHeader('namespace', 'foo', 'bar');
Expand All @@ -26,6 +26,6 @@ $response= $client->__soapCall('function', array(), null, $header);
print $client->__getLastRequest();
?>
--EXPECT--
SoapHeader::__construct(): Argument #1 ($namespace) must not be empty
ValueError: SoapHeader::__construct(): Argument #1 ($namespace) must not be empty
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="myNS" xmlns:ns2="namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header><ns2:foo>bar</ns2:foo></SOAP-ENV:Header><SOAP-ENV:Body><ns1:function/></SOAP-ENV:Body></SOAP-ENV:Envelope>
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug42151.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ try {
$bar = new bar();
$foo = new foo();
} catch (Exception $e){
echo $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
echo "ok\n";
?>
--EXPECTF--
SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://' : failed to load %s
SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://' : failed to load %s

ok
I don't get executed either.
2 changes: 1 addition & 1 deletion ext/soap/tests/bugs/bug42692.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {
$result = $client->checkAuth(1,"two");
echo "Auth for 1 is $result\n";
} catch (Exception $e) {
echo $e->getMessage();
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug55639.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ $client = new soapclient(NULL, [
try {
$client->__soapCall("foo", []);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

$headers = $client->__getLastRequestHeaders();
var_dump($headers);

?>
--EXPECTF--
Unauthorized
SoapFault: Unauthorized
string(%d) "POST / HTTP/1.1
Host: %s
Connection: Keep-Alive
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug71610.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ $exploit = unserialize($ser);
try {
$exploit->blahblah();
} catch(SoapFault $e) {
echo $e->getMessage()."\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
looks like we got no XML document
SoapFault: looks like we got no XML document
1 change: 0 additions & 1 deletion ext/soap/tests/bugs/bug73037.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,3 @@ Iteration 6
Function 'CATALOG' doesn't exist

Function 'CATALOG' doesn't exist

4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug80672.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ try {
$client = new SoapClient(__DIR__ . "/bug80672.xml");
$query = $soap->query(array('sXML' => 'something'));
} catch(SoapFault $e) {
print $e->getMessage();
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
SoapFault: SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/gh16237.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ $server = new SoapServer(null, ['uri'=>"http://testuri.org"]);
try {
clone $server;
} catch (Error $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
--EXPECT--
Trying to clone an uncloneable object of class SoapServer
Error: Trying to clone an uncloneable object of class SoapServer
8 changes: 4 additions & 4 deletions ext/soap/tests/bugs/gh16256.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ $wsdl = __DIR__."/ext/soap/tests/bug41004.wsdl";
try {
new SoapClient($wsdl, ["classmap" => $classmap]);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
try {
new SoapServer($wsdl, ["classmap" => $classmap]);
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
SoapClient::__construct(): Argument #2 ($options) "classmap" option must be an associative array
SoapServer::__construct(): Argument #2 ($options) "classmap" option must be an associative array
ValueError: SoapClient::__construct(): Argument #2 ($options) "classmap" option must be an associative array
ValueError: SoapServer::__construct(): Argument #2 ($options) "classmap" option must be an associative array
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/gh16429.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ $client = new SoapClient(__DIR__."/../interop/Round2/GroupB/round2_groupB.wsdl",
try {
$client->echo2DStringArray($fusion);
} catch (Exception $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
string(10) "xxxxxxxxxx"
Cannot traverse an already closed generator
Exception: Cannot traverse an already closed generator
42 changes: 21 additions & 21 deletions ext/soap/tests/bugs/gh22167.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,31 @@ foreach ($cases as $name => $schema) {
new SoapClient($file, ["cache_wsdl" => WSDL_CACHE_NONE]);
echo "$name: parsed\n";
} catch (SoapFault $e) {
echo "$name: {$e->getMessage()}\n";
echo "$name: ", $e::class, ': ', $e->getMessage(), "\n";
} finally {
unlink($file);
}
}
?>
--EXPECT--
minOccurs: SOAP-ERROR: Parsing Schema: minOccurs value is out of range
maxOccurs: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
negative minOccurs: SOAP-ERROR: Parsing Schema: minOccurs value is out of range
negative maxOccurs: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
minExclusive: SOAP-ERROR: Parsing Schema: minExclusive value is out of range
minInclusive: SOAP-ERROR: Parsing Schema: minInclusive value is out of range
maxExclusive: SOAP-ERROR: Parsing Schema: maxExclusive value is out of range
maxInclusive: SOAP-ERROR: Parsing Schema: maxInclusive value is out of range
totalDigits: SOAP-ERROR: Parsing Schema: totalDigits value is out of range
fractionDigits: SOAP-ERROR: Parsing Schema: fractionDigits value is out of range
length: SOAP-ERROR: Parsing Schema: length value is out of range
minLength: SOAP-ERROR: Parsing Schema: minLength value is out of range
maxLength: SOAP-ERROR: Parsing Schema: maxLength value is out of range
leading whitespace numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading plus numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading zero numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading numeric-string with trailing data: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
negative out-of-range numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
decimal numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
exponent numeric-string: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
minOccurs: SoapFault: SOAP-ERROR: Parsing Schema: minOccurs value is out of range
maxOccurs: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
negative minOccurs: SoapFault: SOAP-ERROR: Parsing Schema: minOccurs value is out of range
negative maxOccurs: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
minExclusive: SoapFault: SOAP-ERROR: Parsing Schema: minExclusive value is out of range
minInclusive: SoapFault: SOAP-ERROR: Parsing Schema: minInclusive value is out of range
maxExclusive: SoapFault: SOAP-ERROR: Parsing Schema: maxExclusive value is out of range
maxInclusive: SoapFault: SOAP-ERROR: Parsing Schema: maxInclusive value is out of range
totalDigits: SoapFault: SOAP-ERROR: Parsing Schema: totalDigits value is out of range
fractionDigits: SoapFault: SOAP-ERROR: Parsing Schema: fractionDigits value is out of range
length: SoapFault: SOAP-ERROR: Parsing Schema: length value is out of range
minLength: SoapFault: SOAP-ERROR: Parsing Schema: minLength value is out of range
maxLength: SoapFault: SOAP-ERROR: Parsing Schema: maxLength value is out of range
leading whitespace numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading plus numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading zero numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
leading numeric-string with trailing data: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
negative out-of-range numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
decimal numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
exponent numeric-string: SoapFault: SOAP-ERROR: Parsing Schema: maxOccurs value is out of range
fractional numeric-string within int range: parsed
2 changes: 1 addition & 1 deletion ext/soap/tests/bugs/protocol_relative_redirect.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {
$client->__soapCall("foo", []);
echo "redirect followed\n";
} catch (SoapFault $e) {
echo "SoapFault: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Expand Down
2 changes: 1 addition & 1 deletion ext/soap/tests/bugs/relative_redirect.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {
$client->__soapCall("foo", []);
echo "redirect followed\n";
} catch (SoapFault $e) {
echo "SoapFault: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Expand Down
2 changes: 1 addition & 1 deletion ext/soap/tests/bugs/relative_redirect_path.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {
$client->__soapCall("foo", []);
echo "redirect followed\n";
} catch (SoapFault $e) {
echo "SoapFault: " . $e->getMessage() . "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
Expand Down
16 changes: 8 additions & 8 deletions ext/soap/tests/fault_warning.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ soap
try {
new SoapFault("", "message"); // Can't be an empty string
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}

try {
new SoapFault(new stdClass(), "message"); // Can't be a non-string (except for null)
} catch (TypeError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}

$fault = new SoapFault("Sender", "message");
Expand All @@ -25,24 +25,24 @@ echo get_class($fault) . "\n";
try {
new SoapFault(["more"], "message"); // two elements in array required
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}

try {
new SoapFault(["m", "more", "superfluous"], "message"); // two required
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
echo $exception::class, ': ', $exception->getMessage(), "\n";
}

$fault = new SoapFault(["more-ns", "Sender"], "message"); // two given
echo get_class($fault);

?>
--EXPECT--
SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
SoapFault::__construct(): Argument #1 ($code) must be of type array|string|null, stdClass given
ValueError: SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
TypeError: SoapFault::__construct(): Argument #1 ($code) must be of type array|string|null, stdClass given
SoapFault
SoapFault
SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
ValueError: SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
ValueError: SoapFault::__construct(): Argument #1 ($code) is not a valid fault code
SoapFault
4 changes: 2 additions & 2 deletions ext/soap/tests/gh15711.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $book->short = NonBackedEnum::First;
try {
$client->dotest($book);
} catch (ValueError $e) {
echo "ValueError: ", $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

echo "--- Test with mismatched enum backing type ---\n";
Expand All @@ -74,7 +74,7 @@ $book->short = StringBackedEnum::First;
try {
$client->dotest($book);
} catch (ValueError $e) {
echo "ValueError: ", $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}

?>
Expand Down
6 changes: 3 additions & 3 deletions ext/soap/tests/gh16318.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ foreach ([$test1, $test2] as $test) {
try {
$client->__soapCall("echoStructArray", array($test), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
} catch (ValueError $e) {
echo $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";
}
}

?>
--EXPECT--
Recursive array cannot be encoded
Recursive array cannot be encoded
ValueError: Recursive array cannot be encoded
ValueError: Recursive array cannot be encoded
Loading