lithium\tests\cases\net\http\AuthTest::testDecode PHP Method

testDecode() public method

public testDecode ( )
    public function testDecode()
    {
        $header = 'qop="auth",nonce="4bca0fbca7bd0",';
        $header .= 'nc="00000001",cnonce="95b2cd1e179bf5414e52ed62811481cf",';
        $header .= 'uri="/http_auth",realm="app",';
        $header .= 'opaque="d3fb67a7aa4d887ec4bf83040a820a46",username="gwoo",';
        $header .= 'response="04d7d878c67f289f37e553d2025e3a52"';
        $expected = array('qop' => 'auth', 'nonce' => '4bca0fbca7bd0', 'nc' => '00000001', 'cnonce' => '95b2cd1e179bf5414e52ed62811481cf', 'uri' => '/http_auth', 'realm' => 'app', 'opaque' => 'd3fb67a7aa4d887ec4bf83040a820a46', 'username' => 'gwoo', 'response' => '04d7d878c67f289f37e553d2025e3a52');
        $result = Auth::decode($header);
        $this->assertEqual($expected, $result);
    }