-- Ralf Eggert <[EMAIL PROTECTED]> wrote
(on Thursday, 21 August 2008, 04:14 PM +0200):
> > Also the isValid method will still throw an error because receive just 
> > calls 
> > isValid.
> > Best would be to catch the Attacker error and return a true instead of this 
> > error, but let all other errors pass.
> 
> Ok, this might work for my form test. But I also have a test for a
> controller which runs the isValid() method of my form. This test needs a
> upload simulation because the controller writes some data to the
> database and renames the uploaded file. To test this I need a valid form
> and cannot catch the attacker error.

I'd suggest creating a mock or stub transfer adapter that does not
utilize $_FILES, and attach that to the element.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to