From 580cd62f0a4fac5dba37a8a152afaecd99e8c767 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 15 Dec 2011 20:07:48 -0500 Subject: removed old libraries - depends on openid_api now --- .../Tests/Auth/OpenID/CryptUtil.php | 54 ---------------------- 1 file changed, 54 deletions(-) delete mode 100644 models/openid-php-openid-782224d/Tests/Auth/OpenID/CryptUtil.php (limited to 'models/openid-php-openid-782224d/Tests/Auth/OpenID/CryptUtil.php') diff --git a/models/openid-php-openid-782224d/Tests/Auth/OpenID/CryptUtil.php b/models/openid-php-openid-782224d/Tests/Auth/OpenID/CryptUtil.php deleted file mode 100644 index 29022d2e1..000000000 --- a/models/openid-php-openid-782224d/Tests/Auth/OpenID/CryptUtil.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright 2005-2008 Janrain, Inc. - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache - */ - -require_once 'Auth/OpenID.php'; -require_once 'Auth/OpenID/CryptUtil.php'; - -class Tests_Auth_OpenID_CryptUtil extends PHPUnit_Framework_TestCase { - function test_length() - { - $cases = array(1, 10, 255); - foreach ($cases as $length) { - $data = Auth_OpenID_CryptUtil::getBytes($length); - $this->assertEquals(Auth_OpenID::bytes($data), $length); - } - } - - function test_different() - { - $num_iterations = 100; - $data_length = 20; - - $data = Auth_OpenID_CryptUtil::getBytes($num_iterations); - for ($i = 0; $i < $num_iterations; $i++) { - $last = $data; - $data = Auth_OpenID_CryptUtil::getBytes($data_length); - $this->assertFalse($data == $last); - } - } - - function test_cryptrand() - { - // It's possible, but HIGHLY unlikely that a correct - // implementation will fail by returning the same number twice - - $s = Auth_OpenID_CryptUtil::getBytes(32); - $t = Auth_OpenID_CryptUtil::getBytes(32); - $this->assertEquals(Auth_OpenID::bytes($s), 32); - $this->assertEquals(Auth_OpenID::bytes($t), 32); - $this->assertFalse($s == $t); - } -} - -- cgit v1.2.3