diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-25 20:11:18 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-25 20:11:18 +0000 |
commit | 190257a4b5b8e7508b7b4fe69b5c548b327b6d6b (patch) | |
tree | e70ea64342d4284180d89d42c77c5ef0855898de | |
parent | 97cf187c76dd4a15d8aa8d11d8734d3a41b2b68b (diff) | |
download | php-openid-190257a4b5b8e7508b7b4fe69b5c548b327b6d6b.zip php-openid-190257a4b5b8e7508b7b4fe69b5c548b327b6d6b.tar.gz php-openid-190257a4b5b8e7508b7b4fe69b5c548b327b6d6b.tar.bz2 |
[project @ Add bad signature check_authentication test]
-rw-r--r-- | Tests/Auth/OpenID/Server.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php index 26dfb82..04342b8 100644 --- a/Tests/Auth/OpenID/Server.php +++ b/Tests/Auth/OpenID/Server.php @@ -269,6 +269,15 @@ class Tests_Auth_OpenID_Server extends PHPUnit_TestCase { $args = $this->_setupCheckAuth(); list($status, $info) = $this->server->checkAuthentication($args); $this->assertEquals(Auth_OpenID_REMOTE_OK, $status); - $this->assertEquals($info, "is_valid:true\n"); + $this->assertEquals("is_valid:true\n", $info); + } + + function test_checkAuthenticationFailSig() + { + $args = $this->_setupCheckAuth(); + $args['openid.sig'] = str_rot13($args['openid.sig']); + list($status, $info) = $this->server->checkAuthentication($args); + $this->assertEquals(Auth_OpenID_REMOTE_OK, $status); + $this->assertEquals("is_valid:false\n", $info); } } |