Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

AbstractControllerTestCase doesn't respect $this->getRequest()->setMethod() #3945

Closed
superdweebie opened this issue Mar 4, 2013 · 0 comments

Comments

@superdweebie
Copy link
Contributor

This docs page http://framework.zend.com/manual/2.1/en/modules/zend.test.phpunit.html has this example:

public function testIndexAction()
{
    $this->getRequest()
        ->setMethod('POST')
        ->setPost(new Parameters(array('argument' => 'value')));
    $this->dispatch('/');
}

Which won't work because if a method isn't supplied to dispatch it doesn't look in the request object, it just defaults to get.

weierophinney added a commit that referenced this issue May 2, 2013
Fix for issue #3945, and fix for PUT with request content
gianarb pushed a commit to zendframework/zend-test that referenced this issue May 15, 2015
weierophinney added a commit to zendframework/zend-test that referenced this issue May 15, 2015
…/AbstractControllerTest-fix

Fix for issue zendframework/zendframework#3945, and fix for PUT with request content
weierophinney added a commit to zendframework/zend-test that referenced this issue May 15, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant