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

testAcceptWithTypeParamFallbackHtml() public method

    public function testAcceptWithTypeParamFallbackHtml()
    {
        $request = new Request(array('env' => array('HTTP_ACCEPT' => 'nothing/matches')));
        $this->assertFalse($request->accepts('json'));
        $this->assertTrue($request->accepts('html'));
        $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