Hi, i'm having problems testing actions with Zend_Form_Element_File. My test
function:

    public function testImportRequestAction($file)
    {
    $this->request->setMethod('POST')
         ->setPost(array(
             'MAX_FILE_SIZE' => "2097152",
    ));

    $_FILES = array('request' => array(
                "name" => "rsaRequest.pem",
                "type" => "text/plain",
                "tmp_name" => "/tmp/phpi17KBB",
                "error" => 0,
                "size" => filesize('/tmp/phpi17KBB'),
    ));

    $this->dispatch('/caoper/requests/importrarequest');

    ....
    }

But the form validation always returns false without any error messages. And
when i force the form to pass validation i get "The file 'request' was
illegal uploaded, possible attack".
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-form-element-file-and-Zend-test-problems-tp2338296p2338296.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to