diff options
author | tailor <cygnus@janrain.com> | 2007-03-06 20:14:27 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-03-06 20:14:27 +0000 |
commit | 157fdb1041f270f6e0c25489a7d0e17379401718 (patch) | |
tree | 614ee37611d7e7f70613baf287a032bfe9cf484e | |
parent | 478a44dbc0d4f0d4a371501c3ffbe37d9bfd89a5 (diff) | |
download | php-openid-157fdb1041f270f6e0c25489a7d0e17379401718.zip php-openid-157fdb1041f270f6e0c25489a7d0e17379401718.tar.gz php-openid-157fdb1041f270f6e0c25489a7d0e17379401718.tar.bz2 |
[project @ Add to-form-markup tests for invalid inputs]
-rw-r--r-- | Tests/Auth/OpenID/AuthRequest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/AuthRequest.php b/Tests/Auth/OpenID/AuthRequest.php index d65bd03..629418f 100644 --- a/Tests/Auth/OpenID/AuthRequest.php +++ b/Tests/Auth/OpenID/AuthRequest.php @@ -157,6 +157,21 @@ class TestAuthRequestOpenID2 extends TestAuthRequestMixin { // TESTS + function test_markup_checkidImmediate() + { + $result = $this->authreq->formMarkup($this->realm, + null, true); + $this->assertTrue(is_a($result, 'Auth_OpenID_FailureResponse')); + } + + function test_markup_returnToArgs() + { + $this->authreq->return_to_args = array('extra' => 'args'); + $result = $this->authreq->formMarkup($this->realm, + null, false); + $this->assertTrue(is_a($result, 'Auth_OpenID_FailureResponse')); + } + function test_setAnonymousWorksForOpenID2() { // OpenID AuthRequests should be able to set 'anonymous' to true. @@ -228,6 +243,13 @@ class TestAuthRequestOpenID1 extends TestAuthRequestMixin { // TESTS + function test_markup_missingReturnTo() + { + $result = $this->authreq->formMarkup($this->realm, + null, false); + $this->assertTrue(is_a($result, 'Auth_OpenID_FailureResponse')); + } + function test_setAnonymousFailsForOpenID1() { // OpenID 1 requests MUST NOT be able to set anonymous to True |