How is an instance of data (or other objects) created? Do you create it directly in the controller or capture it from the bootstrap / registry? If you are using the registry or bootstrap, put the layout in the / bootstrap registry.
If you directly create an instance in the controller, you will need to change your controller. Maybe there is a controller method for setting data mapping, and then there is another way to capture the data card, and if it is not installed, then create an instance. This allows your tests to introduce a layout.
I usually do not scoff at many classes when testing controllers - I want to test the entire application and its ability to display the page ... It seems that you are not testing records in the database, so why not use Zend_Test_PHPUnit_Db to set up an empty table for this test, and not mock the data handler so as not to return data?
source share