summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-01-03 00:11:07 +0000
committertailor <cygnus@janrain.com>2006-01-03 00:11:07 +0000
commitf197e76ec73c78f281ca5d08267b6371e789d615 (patch)
tree64b9ad39676741e35baf70826e733899d40c76a3
parent11b0e0b16b8fcaf89e0d1610c0a0bd4fb7b7ac5b (diff)
downloadphp-openid-f197e76ec73c78f281ca5d08267b6371e789d615.zip
php-openid-f197e76ec73c78f281ca5d08267b6371e789d615.tar.gz
php-openid-f197e76ec73c78f281ca5d08267b6371e789d615.tar.bz2
[project @ Added association test]
-rw-r--r--Tests/Net/OpenID/Association.php17
-rw-r--r--Tests/TestDriver.php1
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/Net/OpenID/Association.php b/Tests/Net/OpenID/Association.php
new file mode 100644
index 0000000..58a9f99
--- /dev/null
+++ b/Tests/Net/OpenID/Association.php
@@ -0,0 +1,17 @@
+<?php
+
+require_once('PHPUnit.php');
+require_once('Net/OpenID/Association.php');
+
+class Tests_Net_OpenID_Association extends PHPUnit_TestCase {
+ function test_me() {
+ $issued = time();
+ $lifetime = 600;
+ $assoc = new Net_OpenID_Association('handle', 'secret', $issued,
+ $lifetime, 'HMAC-SHA1');
+ $s = $assoc->serialize();
+ $assoc2 = Net_OpenID_Association::deserialize('Net_OpenID_Association', $s);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/Tests/TestDriver.php b/Tests/TestDriver.php
index cc78e5a..067863b 100644
--- a/Tests/TestDriver.php
+++ b/Tests/TestDriver.php
@@ -43,6 +43,7 @@ $_test_names = array(
'OIDUtil',
'DiffieHellman',
'HMACSHA1',
+ 'Association'
);
// Load OpenID library tests