summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-25 20:07:25 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-25 20:07:25 +0000
commit97cf187c76dd4a15d8aa8d11d8734d3a41b2b68b (patch)
tree9b30e556552589214c7fd6a40f0fcd991bc0216a /Tests
parentf7222591468959fcd90fd07d509a8d3f321f0f54 (diff)
downloadphp-openid-97cf187c76dd4a15d8aa8d11d8734d3a41b2b68b.zip
php-openid-97cf187c76dd4a15d8aa8d11d8734d3a41b2b68b.tar.gz
php-openid-97cf187c76dd4a15d8aa8d11d8734d3a41b2b68b.tar.bz2
[project @ Add successful check_authentication server test]
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Auth/OpenID/Server.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php
index 8c2da24..26dfb82 100644
--- a/Tests/Auth/OpenID/Server.php
+++ b/Tests/Auth/OpenID/Server.php
@@ -254,4 +254,21 @@ class Tests_Auth_OpenID_Server extends PHPUnit_TestCase {
$this->assertEquals($this->rt_url, $base);
$this->assertEquals('cancel', $query['openid.mode']);
}
+
+ function _setupCheckAuth()
+ {
+ $ret = $this->_startAuth('checkid_immediate', true);
+ list($base, $query) = $this->_parseRedirResp($ret);
+ $this->assertEquals($base, $this->rt_url);
+ $query['openid.mode'] = 'check_authentication';
+ return $query;
+ }
+
+ function test_checkAuthentication()
+ {
+ $args = $this->_setupCheckAuth();
+ list($status, $info) = $this->server->checkAuthentication($args);
+ $this->assertEquals(Auth_OpenID_REMOTE_OK, $status);
+ $this->assertEquals($info, "is_valid:true\n");
+ }
}