diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-25 19:45:00 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-25 19:45:00 +0000 |
commit | e55ae3bec5061231fea8f69d79fc27d41e495fd6 (patch) | |
tree | 4ab7c50fc985bfee22bd80f6781d1a9e1296a576 /Tests/Auth | |
parent | feb845ec2076eae9977e62ab6cb0d515b0074390 (diff) | |
download | php-openid-e55ae3bec5061231fea8f69d79fc27d41e495fd6.zip php-openid-e55ae3bec5061231fea8f69d79fc27d41e495fd6.tar.gz php-openid-e55ae3bec5061231fea8f69d79fc27d41e495fd6.tar.bz2 |
[project @ Added test for need auth in server]
Diffstat (limited to 'Tests/Auth')
-rw-r--r-- | Tests/Auth/OpenID/Server.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php index e75273d..6bdcd32 100644 --- a/Tests/Auth/OpenID/Server.php +++ b/Tests/Auth/OpenID/Server.php @@ -228,4 +228,20 @@ class Tests_Auth_OpenID_Server extends PHPUnit_TestCase { { $this->_checkIDGood('checkid_setup'); } + + function test_checkIdSetupNeedAuth() + { + $args = array( + 'openid.mode' => 'checkid_setup', + 'openid.identity' => $this->id_url, + 'openid.return_to' => $this->rt_url, + 'openid.trust_root' => $this->tr_url, + ); + + $ainfo = new Auth_OpenID_AuthorizationInfo($this->sv_url, $args); + list($status, $info) = $this->server->getAuthResponse(&$ainfo, false); + $this->assertEquals(Auth_OpenID_DO_AUTH, $status); + $this->assertEquals($this->tr_url, $info->getTrustRoot()); + $this->assertEquals($this->id_url, $info->getIdentityURL()); + } } |