Reputation: 452
I test controller by unit test. Controller implements some api who return json. Right to be use ob_ php func. to check return json data for test.
Upvotes: 1
Views: 42
Reputation: 62387
PHPUnit knows how to test output: http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.output
Upvotes: 2