public function test_marshall_PUT_body_as_params() { $this->request->setMethod('PUT'); $this->request->setRawBody('param1=value1¶m2=value2'); $this->plugin->preDispatch($this->request); $this->assertEquals('value1', $this->request->getParam('param1')); $this->assertEquals('value2', $this->request->getParam('param2')); }
/** * @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')); }
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')); }