Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykendall committed Oct 6, 2014
2 parents f98bc83 + fc65397 commit d0cd49d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/QueryAuth/Request/Adapter/Incoming/SlimRequestAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public function getParams()
return $this->request->get();
}

if ($this->getMethod() === SlimRequest::METHOD_DELETE) {
return $this->request->params();
}

return $this->request->post();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,22 @@ public function testGetParamsNotPost()

$this->assertEquals($expected, $params);
}

/**
* @group 18
*/
public function testGetQueryStringParametersDeleteRequest()
{
$expected = ['one' => 'two'];

$this->adaptee->method('getMethod')
->willReturn('DELETE');

$this->adaptee->method('params')
->willReturn($expected);

$params = $this->adapter->getParams();

$this->assertEquals($expected, $params);
}
}

0 comments on commit d0cd49d

Please sign in to comment.