Encodes the response to key-value form. This is a
machine-readable format used to respond to messages which came
directly from the consumer and not through the user-agent. See
the OpenID specification.
public encodeToKVForm ( ) |
function test_noReturnTo() { // will be a ProtocolError raised by Decode or CheckIDRequest.answer $args = array('openid.mode' => 'zebradance', 'openid.identity' => 'http://wagu.unittest/'); $e = new Auth_OpenID_ServerError($args, "waffles"); $this->assertFalse($e->hasReturnTo()); $expected = "error:waffles\nmode:error\n"; $this->assertEquals($e->encodeToKVForm(), $expected); }