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:
parent
4dca2038bf
commit
d8da79cab0
|
@ -137,11 +137,8 @@ class Dispatcher {
|
||||||
$value === 'false' &&
|
$value === 'false' &&
|
||||||
(
|
(
|
||||||
$this->request->method === 'GET' ||
|
$this->request->method === 'GET' ||
|
||||||
(
|
|
||||||
$this->request->method === 'POST' &&
|
|
||||||
strpos($this->request->getHeader('Content-Type'),
|
strpos($this->request->getHeader('Content-Type'),
|
||||||
'application/x-www-form-urlencoded') !== false
|
'application/x-www-form-urlencoded') !== false)
|
||||||
)
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$value = false;
|
$value = false;
|
||||||
|
|
|
@ -319,7 +319,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
|
||||||
'HTTP_ACCEPT' => 'application/text, test',
|
'HTTP_ACCEPT' => 'application/text, test',
|
||||||
'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
|
'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
|
||||||
),
|
),
|
||||||
'method' => 'POST'
|
'method' => 'PUT'
|
||||||
));
|
));
|
||||||
$this->dispatcher = new Dispatcher(
|
$this->dispatcher = new Dispatcher(
|
||||||
$this->http, $this->middlewareDispatcher, $this->reflector,
|
$this->http, $this->middlewareDispatcher, $this->reflector,
|
||||||
|
|
|
@ -75,7 +75,7 @@ class ControllerMethodReflectorTest extends \PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @param double $test
|
* @param double $test something special
|
||||||
*/
|
*/
|
||||||
public function testReadTypeDoubleAnnotations(){
|
public function testReadTypeDoubleAnnotations(){
|
||||||
$reader = new ControllerMethodReflector();
|
$reader = new ControllerMethodReflector();
|
||||||
|
|
Loading…
Reference in New Issue