diff options
author | tailor <cygnus@janrain.com> | 2006-08-28 18:04:14 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-08-28 18:04:14 +0000 |
commit | b4cdf8b459fc274ebf5f8cce627ec6bfcb6898a7 (patch) | |
tree | de7d67de8bcbd6b06cb4ef6ce99799cdf8ec0c83 /Tests/Auth | |
parent | c5e1f65fbeaaac13e1b25a166df7b23a2061adb0 (diff) | |
download | php-openid-b4cdf8b459fc274ebf5f8cce627ec6bfcb6898a7.zip php-openid-b4cdf8b459fc274ebf5f8cce627ec6bfcb6898a7.tar.gz php-openid-b4cdf8b459fc274ebf5f8cce627ec6bfcb6898a7.tar.bz2 |
[project @ Nonce-handling code]
Diffstat (limited to 'Tests/Auth')
-rw-r--r-- | Tests/Auth/OpenID/Consumer.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php index 9e71713..2ed6ee4 100644 --- a/Tests/Auth/OpenID/Consumer.php +++ b/Tests/Auth/OpenID/Consumer.php @@ -217,7 +217,7 @@ class Tests_Auth_OpenID_Consumer extends PHPUnit_TestCase { $result = $consumer->complete($query, $result->endpoint); - $this->assertEquals($result->status, 'success'); + $this->assertEquals($result->status, Auth_OpenID_SUCCESS); $this->assertEquals($result->identity_url, $user_url); } @@ -347,11 +347,6 @@ class _CheckAuthDetectingConsumer extends Auth_OpenID_GenericConsumer { } class Tests_Auth_OpenID_Consumer_CheckNonceTest extends _TestIdRes { - function setUp() - { - parent::setUp(); - } - function test_consumerNonce() { $this->return_to = sprintf('http://rt.unittest/?nonce=%s', @@ -390,12 +385,13 @@ class Tests_Auth_OpenID_Consumer_CheckNonceTest extends _TestIdRes { function test_tamperedNonce() { + // Malformed nonce $this->response = new Auth_OpenID_SuccessResponse($this->endpoint, array('openid.nonce' => 'malformed')); $ret = $this->consumer->_checkNonce($this->server_url, $this->response); $this->assertEquals($ret->status, Auth_OpenID_FAILURE); $this->assertEquals($ret->identity_url, $this->consumer_id); - $this->assertTrue(strpos($ret->message, 'Malformed nonce') === 0); + $this->assertTrue(strpos($ret->message, 'Nonce mismatch') === 0); } function test_missingNonce() |