mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 08:58:25 +00:00
Test to prove issue with empty body for json
This commit is contained in:
parent
31dbda0a71
commit
d4c351563e
1 changed files with 14 additions and 0 deletions
|
@ -399,6 +399,20 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
$this->assertFalse(is_object($this->Controller->data));
|
$this->assertFalse(is_object($this->Controller->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testStartupCallbackJson method
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testStartupCallbackJson() {
|
||||||
|
$_SERVER['REQUEST_METHOD'] = 'PUT';
|
||||||
|
$_SERVER['CONTENT_TYPE'] = 'application/json';
|
||||||
|
$this->Controller->request = $this->getMock('CakeRequest', array('_readInput'));
|
||||||
|
$this->RequestHandler->startup($this->Controller);
|
||||||
|
$this->assertTrue(is_array($this->Controller->data));
|
||||||
|
$this->assertFalse(is_object($this->Controller->data));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testStartupCallback with charset.
|
* testStartupCallback with charset.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue