summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-02-01 21:02:56 +0000
committertailor <cygnus@janrain.com>2007-02-01 21:02:56 +0000
commit4880f77b8c323fd5c52d7d9fc2fe9c97779a7895 (patch)
treebac796cfb04a73d7320be2577efcd9d84c57127c /Tests
parentb60859551bbc40e8917cc3747509c9a21ebc0b65 (diff)
downloadphp-openid-4880f77b8c323fd5c52d7d9fc2fe9c97779a7895.zip
php-openid-4880f77b8c323fd5c52d7d9fc2fe9c97779a7895.tar.gz
php-openid-4880f77b8c323fd5c52d7d9fc2fe9c97779a7895.tar.bz2
[project @ Added OpenID2 checkid_setup decode test]
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Auth/OpenID/Server.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php
index 74703cb..2b33243 100644
--- a/Tests/Auth/OpenID/Server.php
+++ b/Tests/Auth/OpenID/Server.php
@@ -191,6 +191,28 @@ class Tests_Auth_OpenID_Test_Decode extends PHPUnit_TestCase {
$this->assertEquals($r->return_to, $this->rt_url);
}
+ function test_checkidSetupOpenID2()
+ {
+ $args = array(
+ 'openid.ns' => Auth_OpenID_OPENID2_NS,
+ 'openid.mode' => 'checkid_setup',
+ 'openid.identity' => $this->id_url,
+ 'openid.claimed_id' => $this->claimed_id,
+ 'openid.assoc_handle' => $this->assoc_handle,
+ 'openid.return_to' => $this->rt_url,
+ 'openid.realm' => $this->tr_url
+ );
+
+ $r = $this->decoder->decode($args);
+ $this->assertTrue(is_a($r, 'Auth_OpenID_CheckIDRequest'));
+ $this->assertEquals($r->mode, "checkid_setup");
+ $this->assertEquals($r->immediate, False);
+ $this->assertEquals($r->identity, $this->id_url);
+ $this->assertEquals($r->claimed_id, $this->claimed_id);
+ $this->assertEquals($r->trust_root, $this->tr_url);
+ $this->assertEquals($r->return_to, $this->rt_url);
+ }
+
function test_checkidSetupNoIdentity()
{
$args = array(