mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5137 201d5d3c-b55e-5fd7-737f-ddc643e51545
38 lines
987 B
PHP
38 lines
987 B
PHP
<?php
|
|
|
|
/**
|
|
* Tests for the Association implementation.
|
|
*
|
|
* PHP versions 4 and 5
|
|
*
|
|
* LICENSE: See the COPYING file included in this distribution.
|
|
*
|
|
* @package OpenID
|
|
* @author JanRain, Inc. <openid@janrain.com>
|
|
* @copyright 2005 Janrain, Inc.
|
|
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
|
*/
|
|
|
|
require_once 'PHPUnit.php';
|
|
require_once 'Auth/OpenID/Association.php';
|
|
|
|
class Tests_Auth_OpenID_Association extends PHPUnit_TestCase {
|
|
function test_me()
|
|
{
|
|
$issued = time();
|
|
$lifetime = 600;
|
|
$assoc = new Auth_OpenID_Association('handle', 'secret', $issued,
|
|
$lifetime, 'HMAC-SHA1');
|
|
$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));
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|