diff options
author | tailor <dag@janrain.com> | 2008-05-23 22:14:44 +0000 |
---|---|---|
committer | tailor <dag@janrain.com> | 2008-05-23 22:14:44 +0000 |
commit | cf2b16b8dc2a030751a2bc0e6c39152ef89dd66a (patch) | |
tree | 7e118fd6c6cdc757f157deaf1fb6bf80f2e127b8 /Tests | |
parent | 0a58ec4c1d3cc96b249147e4e2554a83ff80f725 (diff) | |
download | php-openid-cf2b16b8dc2a030751a2bc0e6c39152ef89dd66a.zip php-openid-cf2b16b8dc2a030751a2bc0e6c39152ef89dd66a.tar.gz php-openid-cf2b16b8dc2a030751a2bc0e6c39152ef89dd66a.tar.bz2 |
[project @ Add toHTML methods. Server.toFormMarkup passes through form attributes]
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Auth/OpenID/Consumer.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php index 2a02926..148d6f3 100644 --- a/Tests/Auth/OpenID/Consumer.php +++ b/Tests/Auth/OpenID/Consumer.php @@ -1632,6 +1632,28 @@ class Tests_Auth_OpenID_Consumer_TestFetchAssoc extends PHPUnit_TestCase { } } +class Tests_Auth_OpenID_AuthRequestHTMLMarkup extends PHPUnit_TestCase { + function setUp() + { + $this->endpoint = new Auth_OpenID_ServiceEndpoint(); + $this->endpoint->claimed_id = 'identity_url'; + + $this->request = new Auth_OpenID_AuthRequest($this->endpoint, null); + } + + function test_htmlMarkup() + { + $html = $this->request->htmlMarkup('http://realm.com/', + 'http://realm.com/return_to'); + $this->assertTrue(substr($html,"<html>") !== false); + $this->assertTrue(substr($html,"</html>") !== false); + $this->assertTrue(substr($html,"<body onload") !== false); + $this->assertTrue(substr($html,"</body>") !== false); + $this->assertTrue(substr($html,"<form") !== false); + $this->assertTrue(substr($html,"</form>") !== false); + } +} + class Tests_Auth_OpenID_SuccessResponse extends PHPUnit_TestCase { function setUp() { @@ -2448,6 +2470,7 @@ class Tests_Auth_OpenID_KVPost extends PHPUnit_TestCase { global $Tests_Auth_OpenID_Consumer_other; $Tests_Auth_OpenID_Consumer_other = array( // new Tests_Auth_OpenID_Consumer_TestSetupNeeded(), + new Tests_Auth_OpenID_AuthRequestHTMLMarkup(), new Tests_Auth_OpenID_Consumer_TestCheckAuth(), new Tests_Auth_OpenID_Consumer_TestCheckAuthTriggered(), new Tests_Auth_OpenID_Consumer_TestFetchAssoc(), |