Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/Client/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function xmlContent(): string
*/
public function arguments(): array
{
$doc = Document::fromXmlString($this->xmlContent());
$doc = Document::fromXmlString($this->body());
$method = $doc->locate(new SoapBodyLocator())?->firstElementChild;

return Arr::wrap(Arr::get(element_decode($method, traverse(new RemoveNamespaces())), 'node', []));
Expand Down
13 changes: 13 additions & 0 deletions tests/Unit/SoapClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,19 @@ public function testSoapWithDifferentHeaders($header, $exspected): void
Soap::assertActionCalled('GetWeatherInformation');
}

public function testArgumentsCanBeCalledTwice(): void
{
Soap::fake();
Event::fake();
Soap::assertNothingSent();
$response = Soap::baseWsdl(dirname(__DIR__, 1).'/Fixtures/Wsdl/weather.wsdl')
->call('GetWeatherInformation');
self::assertTrue($response->ok());
Soap::assertSent(function (Request $request) {
return $request->arguments() === $request->arguments();
});
}

public function soapHeaderProvider(): array
{
$header = [
Expand Down