ZF-6162: No REQUEST_METHOD populated by default
Description
If I'm using the {{REQUEST_METHOD}} or {{$this->_request->getMethod()}} in my controller, I get "undefined index" while executing tests.
I guess the expected behaviour would be {{GET}}. An intermediate fix is to use {{setMethod('GET')}} in your test case.
Comments
Posted by Benjamin Eberlei (beberlei) on 2009-09-18T02:29:43.000+0000
Fixed! Method is GET by default now
Posted by Matthew Weier O'Phinney (matthew) on 2009-09-21T07:48:28.000+0000
The update broke existing unit tests (which showed incorrect behavior). Please see ZF-7885. I've fixed the tests in the 1.9 release branch and trunk at this time.
Posted by Benjamin Eberlei (beberlei) on 2009-09-21T08:13:34.000+0000
sorry, for me all the tests run through, this is weird
Posted by Matthew Weier O'Phinney (matthew) on 2009-09-21T08:27:39.000+0000
The last two tests in the HttpTestCaseTest suite were failing; I've updated in the past hour and they now pass. :)
There was a test specifically named "testRequestMethodShouldBeNullByDefault" that is now renamed to "testRequestMethodShouldBeGetByDefault"; the following test actually called it as well.