AcceptHeaderParserTest::shouldParseAcceptHeader PHP Method

shouldParseAcceptHeader() public method

    public function shouldParseAcceptHeader()
    {
        //given
        $accept = 'text/ *;q=0.3, text/html;q=0.7, */*;q=0.5';
        //when
        $parsed = AcceptHeaderParser::parse($accept);
        //then
        $this->assertEquals(array('text/html' => 0.7, '*/*' => 0.5, 'text/*' => 0.3), $parsed);
    }