mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding unit test for HTTP DELETE and RequestHandlerComponent::requestedWith
This commit is contained in:
parent
0af698c591
commit
e6f6ded334
1 changed files with 3 additions and 0 deletions
|
@ -601,6 +601,9 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
$result = $this->RequestHandler->requestedWith(array('rss', 'atom'));
|
||||
$this->assertFalse($result);
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'DELETE';
|
||||
$this->assertEquals('json', $this->RequestHandler->requestedWith());
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
unset($_SERVER['CONTENT_TYPE']);
|
||||
$_SERVER['HTTP_CONTENT_TYPE'] = 'application/json';
|
||||
|
|
Loading…
Add table
Reference in a new issue