summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-02-13 18:39:53 +0000
committertailor <cygnus@janrain.com>2007-02-13 18:39:53 +0000
commit7eee528d291f8daaba3ec57b843de85027918209 (patch)
tree3b8010d482783bb69c5046d57f241172d162842f
parent283472632617873d33038cf51cd8037c2ca2d131 (diff)
downloadphp-openid-7eee528d291f8daaba3ec57b843de85027918209.zip
php-openid-7eee528d291f8daaba3ec57b843de85027918209.tar.gz
php-openid-7eee528d291f8daaba3ec57b843de85027918209.tar.bz2
[project @ Repair tests under no-math conditions]
-rw-r--r--Tests/Auth/OpenID/Consumer.php19
-rw-r--r--Tests/Auth/OpenID/Server.php3
-rw-r--r--admin/texttest.php2
3 files changed, 9 insertions, 15 deletions
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php
index 5d94347..c654d73 100644
--- a/Tests/Auth/OpenID/Consumer.php
+++ b/Tests/Auth/OpenID/Consumer.php
@@ -1949,7 +1949,6 @@ function setConsumerSession(&$con)
$con->session_types = array('DH-SHA1' => 'FastConsumerSession');
}
-if (!defined('Auth_OpenID_NO_MATH_SUPPORT')) {
class TestCreateAssociationRequest extends PHPUnit_TestCase {
function setUp()
{
@@ -2114,16 +2113,9 @@ class TestOpenID2SHA1 extends TestDiffieHellmanResponseParameters {
var $message_namespace = Auth_OpenID_OPENID2_NS;
}
-if (Auth_OpenID_SHA256_AVAILABLE) {
- class TestOpenID2SHA256 extends TestDiffieHellmanResponseParameters {
- var $session_cls = 'Auth_OpenID_DiffieHellmanSHA256ConsumerSession';
- var $message_namespace = Auth_OpenID_OPENID2_NS;
- }
-} else {
- print "(Skipping TestOpenID2SHA256)";
-}
-} else {
- print "(Skipping association tests)";
+class TestOpenID2SHA256 extends TestDiffieHellmanResponseParameters {
+ var $session_cls = 'Auth_OpenID_DiffieHellmanSHA256ConsumerSession';
+ var $message_namespace = Auth_OpenID_OPENID2_NS;
}
// Add other test cases to be run.
@@ -2145,15 +2137,16 @@ $Tests_Auth_OpenID_Consumer_other = array(
new TestReturnToArgs(),
new IDPDrivenTest(),
new TestDiscoveryVerification(),
- new TestCreateAssociationRequest(),
);
if (!defined('Auth_OpenID_NO_MATH_SUPPORT')) {
+ $Tests_Auth_OpenID_Consumer_other[] = new TestCreateAssociationRequest();
$Tests_Auth_OpenID_Consumer_other[] = new TestOpenID1SHA1();
$Tests_Auth_OpenID_Consumer_other[] = new TestOpenID2SHA1();
}
-if (Auth_OpenID_SHA256_AVAILABLE) {
+if (!defined('Auth_OpenID_NO_MATH_SUPPORT') &&
+ Auth_OpenID_SHA256_AVAILABLE) {
$Tests_Auth_OpenID_Consumer_other[] = new TestOpenID2SHA256();
}
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php
index 7917eab..a0e186c 100644
--- a/Tests/Auth/OpenID/Server.php
+++ b/Tests/Auth/OpenID/Server.php
@@ -1697,7 +1697,8 @@ class Tests_Auth_OpenID_ServerTest extends PHPUnit_TestCase {
function test_associate4()
{
- if (!Auth_OpenID_HMACSHA256_SUPPORTED) {
+ if (defined('Auth_OpenID_NO_MATH_SUPPORT') ||
+ !Auth_OpenID_HMACSHA256_SUPPORTED) {
print "(Skipping test_associate4)";
return;
}
diff --git a/admin/texttest.php b/admin/texttest.php
index bf174a5..cbfe0af 100644
--- a/admin/texttest.php
+++ b/admin/texttest.php
@@ -170,4 +170,4 @@ if ($totals['error'] || $totals['failure']) {
exit(1);
}
-?> \ No newline at end of file
+?>