add test for not failing when adding more comments after type parameters, do not limit x-www-form-urlencoded to POST

This commit is contained in:
Bernhard Posselt 2014-05-06 16:58:39 +02:00
parent 4dca2038bf
commit d8da79cab0
3 changed files with 4 additions and 7 deletions

View File

@ -137,11 +137,8 @@ class Dispatcher {
$value === 'false' &&
(
$this->request->method === 'GET' ||
(
$this->request->method === 'POST' &&
strpos($this->request->getHeader('Content-Type'),
'application/x-www-form-urlencoded') !== false
)
strpos($this->request->getHeader('Content-Type'),
'application/x-www-form-urlencoded') !== false)
)
) {
$value = false;

View File

@ -319,7 +319,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
'HTTP_ACCEPT' => 'application/text, test',
'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
),
'method' => 'POST'
'method' => 'PUT'
));
$this->dispatcher = new Dispatcher(
$this->http, $this->middlewareDispatcher, $this->reflector,

View File

@ -75,7 +75,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
/**
* @Annotation
* @param double $test
* @param double $test something special
*/
public function testReadTypeDoubleAnnotations(){
$reader = new ControllerMethodReflector();