diff options
author | tailor <cygnus@janrain.com> | 2007-09-19 22:32:20 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-09-19 22:32:20 +0000 |
commit | 5e945b27e3a0722e4d8328e5ae839ebc4078cca1 (patch) | |
tree | 9700d440d3eae2294d3e5c3b19cb6ec6281924ce | |
parent | c20df37b5ad481fdf4e6d161bfd2723a37d3e9d8 (diff) | |
download | php-openid-5e945b27e3a0722e4d8328e5ae839ebc4078cca1.zip php-openid-5e945b27e3a0722e4d8328e5ae839ebc4078cca1.tar.gz php-openid-5e945b27e3a0722e4d8328e5ae839ebc4078cca1.tar.bz2 |
[project @ update mock verifyDiscoveryResults]
-rw-r--r-- | Tests/Auth/OpenID/Consumer.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php index e619d1c..192fbdf 100644 --- a/Tests/Auth/OpenID/Consumer.php +++ b/Tests/Auth/OpenID/Consumer.php @@ -1742,21 +1742,25 @@ class Tests_Auth_OpenID_ConsumerTest2 extends PHPUnit_TestCase { class IDPDrivenTest_Consumer1 extends Auth_OpenID_GenericConsumer { var $iverified = array(); var $endpoint = null; + var $failure_cb = null; + var $check_endpoint = null; function _idResCheckNonce($message, $endpoint) { return true; } - function _verifyDiscoveryResults($identifier, $server_url) + function _verifyDiscoveryResults($identifier, $endpoint) { + call_user_func($this->failure_cb, + $endpoint === $this->check_endpoint); $this->iverified[] = $this->endpoint; return $this->endpoint; } } class IDPDrivenTest_Consumer2 extends Auth_OpenID_GenericConsumer { - function verifyDiscoveryResults($identifier, $server_url) + function verifyDiscoveryResults($identifier, $endp) { return new Auth_OpenID_FailureResponse(null, "Bogus"); @@ -1783,6 +1787,8 @@ class IDPDrivenTest extends PHPUnit_TestCase { global $GOODSIG; $this->consumer = new IDPDrivenTest_Consumer1($this->store); + $this->consumer->failure_cb = array(&$this, "assertTrue"); + $this->consumer->check_endpoint =& $this->endpoint; $identifier = '=directed_identifier'; $message = Auth_OpenID_Message::fromPostArgs(array( |