lithium\tests\cases\action\RequestTest::testContentTypeDetection PHP Method

testContentTypeDetection() public method

    public function testContentTypeDetection()
    {
        $request = new Request(array('env' => array('CONTENT_TYPE' => 'application/json; charset=UTF-8', 'REQUEST_METHOD' => 'POST')));
        $this->assertTrue($request->is('json'));
        $this->assertFalse($request->is('html'));
        $this->assertFalse($request->is('foo'));
    }
RequestTest