Exemplo n.º 1
0
 public function test_marshall_PUT_body_as_params()
 {
     $this->request->setMethod('PUT');
     $this->request->setRawBody('param1=value1&param2=value2');
     $this->plugin->preDispatch($this->request);
     $this->assertEquals('value1', $this->request->getParam('param1'));
     $this->assertEquals('value2', $this->request->getParam('param2'));
 }
Exemplo n.º 2
0
 /**
  * @group ZF-1798
  */
 public function testParamSourcesHonoredByGetParam()
 {
     $_GET = array('foo' => 'bar');
     $_POST = array('foo' => 'baz');
     $this->_request->setParamSources(array('_POST'));
     $this->assertEquals('baz', $this->_request->getParam('foo'));
 }
Exemplo n.º 3
0
 public function testPostDispatchQuitsWithFalseUserErrorHandlerParam()
 {
     $front = Controller\Front::getInstance();
     $front->resetInstance();
     $front->setParam('noErrorHandler', true);
     $this->response->setException(new Dispatcher\Exception('Testing controller exception'));
     $this->request->setModuleName('foo')->setControllerName('bar')->setActionName('baz');
     $this->plugin->postDispatch($this->request);
     $this->assertNull($this->request->getParam('error_handler'));
 }