out how to emulate this within Zend_Test_PHPUnit_ControllerTestCase. I can
manually emulate using Zend_Http_Client like so:
$request = new Zend_Http_Client('http://www.domain.com/controller/action');
$xml = 'some valid xml here';
$result =
$request->setRawData($xml)->setEncType('text/xml')->request('POST')->getBody();
However, I can't figure out how to run assertions against the result.
Can I just manually set $this->response->body = $result, and then run the
standard Zend_Test assertions against it?
Or is there an better way to emulate raw XML POST data from within
Zend_Test_PHPUnit_ControllerTestCase ?
Thx in advance. :)
--
View this message in context: http://www.nabble.com/Zend_Test---How-to-emulate-raw-XML-POST-data--tp20784041p20784041.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论