Zend 1 unittest不发送POST值

时间:2013-06-10 10:13:32

标签: php zend-framework

我有这个简单的测试

public function testUserCanRegisterAction()
   {
       $data = array(
            'email'=>'ppp@hhh.it',
            'password'=>'password',
            'repassword'=>'password',
            'domain'=>'googlish.com',
            'country'=>'it',
            'category'=>5,
            'terms_accept'=>1,
        );
        $this->request->setPost($data);
        $this->request->setHeader('X_REQUESTED_WITH', 'XMLHttpRequest');
        $this->request->setMethod('POST');

        $this->dispatch('/user/signup');


        $body = $this->response->getBody();
        $phpNative = Zend_Json::decode($body);
        var_dump( $phpNative );

   }

但似乎没有发送帖子值 关于它的任何想法?

你可以找到更多信息 https://gist.github.com/whisher

0 个答案:

没有答案