本文整理汇总了PHP中Zend_XmlRpc_Request::loadXml方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_XmlRpc_Request::loadXml方法的具体用法?PHP Zend_XmlRpc_Request::loadXml怎么用?PHP Zend_XmlRpc_Request::loadXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_XmlRpc_Request
的用法示例。
在下文中一共展示了Zend_XmlRpc_Request::loadXml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetFault
/**
* getFault() test
*/
public function testGetFault()
{
$fault = $this->_request->getFault();
$this->assertTrue(null === $fault);
$this->_request->loadXml('foo');
$fault = $this->_request->getFault();
$this->assertTrue($fault instanceof Zend_XmlRpc_Fault);
}
示例2: testDoesNotAllowExternalEntities
/**
* @group ZF-12293
*/
public function testDoesNotAllowExternalEntities()
{
$payload = file_get_contents(dirname(__FILE__) . '/_files/ZF12293-request.xml');
$payload = sprintf($payload, 'file://' . realpath(dirname(__FILE__) . '/_files/ZF12293-payload.txt'));
$this->_request->loadXml($payload);
$method = $this->_request->getMethod();
$this->assertTrue(empty($method));
if (is_string($method)) {
$this->assertNotContains('Local file inclusion', $method);
}
}
示例3: testShouldDisallowsDoctypeInRequestXmlAndReturnFalseOnLoading
public function testShouldDisallowsDoctypeInRequestXmlAndReturnFalseOnLoading()
{
$payload = file_get_contents(dirname(__FILE__) . '/_files/ZF12293-request.xml');
$payload = sprintf($payload, 'file://' . realpath(dirname(__FILE__) . '/_files/ZF12293-payload.txt'));
$this->assertFalse($this->_request->loadXml($payload));
}