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

testAcceptWithTypeParam() public method

    public function testAcceptWithTypeParam()
    {
        $request = new Request(array('env' => array('HTTP_ACCEPT' => 'application/json')));
        $this->assertFalse($request->accepts('text'));
        $this->assertTrue($request->accepts('json'));
        $this->assertFalse($request->accepts('html'));
    }
RequestTest