diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 17b50cbea..bc0e49cf2 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -399,6 +399,20 @@ class RequestHandlerComponentTest extends CakeTestCase { $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. *