summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/Auth/OpenID/Association.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Association.php b/Tests/Auth/OpenID/Association.php
index fcdda0d..61d3e71 100644
--- a/Tests/Auth/OpenID/Association.php
+++ b/Tests/Auth/OpenID/Association.php
@@ -33,6 +33,23 @@ class Tests_Auth_OpenID_Association extends PHPUnit_TestCase {
$this->assertTrue($assoc2->equal($assoc));
}
}
+ function test_me256()
+ {
+ if(!Auth_OpenID_HMACSHA256_SUPPORTED) return;
+ $issued = time();
+ $lifetime = 600;
+ $assoc = new Auth_OpenID_Association('handle', 'secret', $issued,
+ $lifetime, 'HMAC-SHA256');
+ $s = $assoc->serialize();
+ $assoc2 = Auth_OpenID_Association::deserialize(
+ 'Auth_OpenID_Association', $s);
+
+ if ($assoc2 === null) {
+ $this->fail('deserialize returned null');
+ } else {
+ $this->assertTrue($assoc2->equal($assoc));
+ }
+ }
}
?>