本文整理汇总了PHP中ApiTester::seeResponseIsXml方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::seeResponseIsXml方法的具体用法?PHP ApiTester::seeResponseIsXml怎么用?PHP ApiTester::seeResponseIsXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTester
的用法示例。
在下文中一共展示了ApiTester::seeResponseIsXml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testTestUsersCreation
public function testTestUsersCreation(ApiTester $I)
{
$I->wantTo('make sure my test users have been created');
$I->amHttpAuthenticated('admin', 'admin');
$I->sendGET($this->baseUrl . '/users/' . $this->userId);
$I->seeResponseCodeIs(200);
$I->seeResponseIsXml();
$I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
$I->sendGET($this->baseUrl . '/users/' . $this->sharerUserId);
$I->seeResponseCodeIs(200);
$I->seeResponseIsXml();
$I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
}
示例2: deleteUser
public function deleteUser(ApiTester $I, \Codeception\Scenario $scenario)
{
//$scenario->skip('ownCloud master is broken');
$I->wantTo('delete the user');
$I->amHttpAuthenticated('admin', 'admin');
$I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded');
$I->sendDELETE($this->apiUrl . '/users/' . $this->userId);
$I->seeResponseCodeIs(200);
$I->seeResponseIsXml();
$I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
}
示例3: ApiTester
<?php
$I = new ApiTester($scenario);
$I->am('Saman IT employee!');
$I->wantTo('test GetProductInfo method on this webservice');
$I->haveHttpHeader('Content-Type', 'text/xml');
$I->sendPOST('/webservice.php', '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<GetProductInfo xmlns="http://example.com/nikapps/samanussd/soap/samansoapserver">
<productCode>123213</productCode>
<languageCode>Fa</languageCode>
</GetProductInfo>
</Body>
</Envelope>');
$I->seeResponseIsXml();
$I->seeResponseContains('<Result>1;1000;Ok!</Result>');