I’m doing unit testing on a Zend Framework, and I’m presently testing functions in my model controller. At some point, one of the functions assigns:
Zend_Layout::getMvcInstance()->assign('var_name', $someVar);
Because I have not called any controllers or views, I am unsure of how to view this data. I’d like to keep things isolated so my unit tests remain properly contained. Is there any reasonable way to grab this variable without modifying the function I am testing?
For reference, I am using PHPUnit.
This should work: