Codeception / Codeception/module-soap

Issue in XML parser in SOAP function

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
0
Forks
4
PR merge metrics
No merged PRs in 30d

Description

If I do:

``` php
$xml = new \Codeception\Util\XmlBuilder();
$xml->name->val('test')->parent()
->catid->val(4);

$I->sendSoapRequest('create', $xml);
```

The soap request works:

```
[Request] test4
```

However if I do:

```
$I->sendSoapRequest('create', 'test4');
```

It says:

```

[PHPUnit_Framework_Exception] DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 1

```

The problem I think is here: https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Xml.php#L27-L57

The parser seems able to parse a xml string wrapped in an outer tag ():

`$I->sendSoapRequest('create', 'test4');`

but not like:

`$I->sendSoapRequest('create', 'test4');`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.