|
@@ -44,6 +44,11 @@ class Zend_XmlRpc_ResponseTest extends PHPUnit_Framework_TestCase
|
|
|
protected $_response;
|
|
protected $_response;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @var bool
|
|
|
|
|
+ */
|
|
|
|
|
+ protected $_errorOccured = false;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* Setup environment
|
|
* Setup environment
|
|
|
*/
|
|
*/
|
|
|
public function setUp()
|
|
public function setUp()
|
|
@@ -137,6 +142,19 @@ class Zend_XmlRpc_ResponseTest extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @group ZF-9039
|
|
|
|
|
+ */
|
|
|
|
|
+ public function testExceptionIsThrownWhenInvalidXmlIsReturnedByServer()
|
|
|
|
|
+ {
|
|
|
|
|
+ set_error_handler(array($this, 'handleError'));
|
|
|
|
|
+ $invalidResponse = 'foo';
|
|
|
|
|
+ $response = new Zend_XmlRpc_Response();
|
|
|
|
|
+ $this->assertFalse($this->_errorOccured);
|
|
|
|
|
+ $this->assertFalse($response->loadXml($invalidResponse));
|
|
|
|
|
+ $this->assertFalse($this->_errorOccured);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* @group ZF-5404
|
|
* @group ZF-5404
|
|
|
*/
|
|
*/
|
|
|
public function testNilResponseFromXmlRpcServer()
|
|
public function testNilResponseFromXmlRpcServer()
|
|
@@ -232,4 +250,9 @@ EOD;
|
|
|
} catch (Exception $e) {
|
|
} catch (Exception $e) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function handleError($error)
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->_errorOccured = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|