我有这个简单的测试
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