Unit Test json output in Zend Framework

The Zend tutorial lists many statements for checking the output generated by a query.

http://framework.zend.com/manual/en/zend.test.phpunit.html

But they all seem to suggest that the output is html. I need to check json output instead.

Are there any statements useful for checking json, or is there at least a general way to make statements against output? Anything that doesnโ€™t rely on html output?

+5
source share
1 answer

, JSON, Zend_Test_PHPUnit. , , , , , JSON, , (/). PHPUnit generic .

UPDATE. , ( Zend_Test_PHPUnit_ControllerTestCase):

$this->getResponse()->getBody();
+13

All Articles