diff options
-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()); + } } |