Skip to content

Commit a966d18

Browse files
VozivDavertMik
authored andcommitted
Fixes a missing _ for _getResponseContent() in seeXmlResponseEquals (#5074)
* Fixes a missing _ for _getResponseContent() in seeXmlResponseEquals * Added test
1 parent f9fa3b9 commit a966d18

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Codeception/Module/REST.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ public function grabAttributeFromXmlElement($cssOrXPath, $attribute)
12951295
*/
12961296
public function seeXmlResponseEquals($xml)
12971297
{
1298-
\PHPUnit\Framework\Assert::assertXmlStringEqualsXmlString($this->connectionModule->getResponseContent(), $xml);
1298+
\PHPUnit\Framework\Assert::assertXmlStringEqualsXmlString($this->connectionModule->_getResponseContent(), $xml);
12991299
}
13001300

13011301

tests/unit/Codeception/Module/RestTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ public function testValidXml()
122122
$this->module->seeResponseEquals('<xml><name>John</name></xml>');
123123
}
124124

125+
public function testXmlResponseEquals()
126+
{
127+
$this->setStubResponse('<xml></xml>');
128+
$this->module->seeResponseIsXml();
129+
$this->module->seeXmlResponseEquals('<xml></xml>');
130+
}
131+
125132
public function testInvalidXml()
126133
{
127134
$this->setExpectedException('PHPUnit\Framework\ExpectationFailedException');

0 commit comments

Comments
 (0)