Hi Thomas,
thanks for your thoughts. I solved this issue now by using my own file
transfer adapter for unit testing. It looks like this:
class My_File_Transfer_Adapter_Test extends
Zend_File_Transfer_Adapter_Http
{
public function __construct()
{
$this->_files = $this->_prepareFiles($_FILES);
}
public function receive($files = null)
{
return true;
}
public function isReceived($files = null)
{
return true;
}
}
In the testcase I manipulate the $_FILES array and set the transfer
adapter for the field:
$form->getElement('employer_logo')->setTransferAdapter(
new My_File_Transfer_Adapter_Test());
Works ok for me though I know it is not the best solution. Now I hope I
can use this as well for my controller tests... :-)
Thanks and best regards,
Ralf