--TEST--
SOAP: SoapClient::__setHeaders array overrides previous headers
--EXTENSIONS--
soap
--FILE--
"test://",
"uri" => "test://",
"exceptions" => false,
"trace" => true,
]);
$client->__setSoapHeaders(new \SoapHeader('ns', 'Header', ['something' => 1]));
$client->__setSoapHeaders(new \SoapHeader('ns', 'Header', ['something' => 2]));
$client->test();
echo $client->__getLastRequest();
$client = new SoapClient(null, [
"location" => "test://",
"uri" => "test://",
"exceptions" => false,
"trace" => true,
]);
$client->__setSoapHeaders([new \SoapHeader('ns', 'Header', ['something' => 1])]);
$client->__setSoapHeaders([new \SoapHeader('ns', 'Header', ['something' => 2])]);
$client->test();
echo $client->__getLastRequest();
?>
--EXPECT--
- something2
- something2