svn: /pear/packages/Services_ReCaptcha/trunk/ Services/ReCaptcha.php package.xml tests/test_errors.phpt tests/test_validate.phpt

From: Date: Sat, 10 Apr 2010 13:04:21 +0000
Subject: svn: /pear/packages/Services_ReCaptcha/trunk/ Services/ReCaptcha.php package.xml tests/test_errors.phpt tests/test_validate.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-59235@lists.php.net to get a copy of this message
izi Sat, 10 Apr 2010 13:04:21 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297801 Log: * fixed 2 tests that failed when running tests against the live server, * make sure explode() splits the validate response in two tokens only. Changed paths: U pear/packages/Services_ReCaptcha/trunk/Services/ReCaptcha.php U pear/packages/Services_ReCaptcha/trunk/package.xml U pear/packages/Services_ReCaptcha/trunk/tests/test_errors.phpt U pear/packages/Services_ReCaptcha/trunk/tests/test_validate.phpt Modified: pear/packages/Services_ReCaptcha/trunk/Services/ReCaptcha.php =================================================================== --- pear/packages/Services_ReCaptcha/trunk/Services/ReCaptcha.php 2010-04-10 13:03:07 UTC (rev 297800) +++ pear/packages/Services_ReCaptcha/trunk/Services/ReCaptcha.php 2010-04-10 13:04:21 UTC (rev 297801) @@ -313,7 +313,7 @@ ); } - $body = explode("\n", $httpResponse->getBody()); + $body = explode("\n", $httpResponse->getBody(), 2); if (count($body) != 2) { $this->setError('unknown'); return false; Modified: pear/packages/Services_ReCaptcha/trunk/package.xml =================================================================== --- pear/packages/Services_ReCaptcha/trunk/package.xml 2010-04-10 13:03:07 UTC (rev 297800) +++ pear/packages/Services_ReCaptcha/trunk/package.xml 2010-04-10 13:04:21 UTC (rev 297801) @@ -40,17 +40,18 @@ </lead> <date>2010-01-04</date> <version> - <release>0.2.2</release> - <api>0.2.2</api> + <release>1.0.0</release> + <api>1.0.0</api> </version> <stability> - <release>beta</release> - <api>beta</api> + <release>stable</release> + <api>stable</api> </stability> <license uri="http://www.opensource.org/licenses/mit-license.html">MIT</license> <notes> -* All setters now return the current instance to allow chaining of set calls, -* Some fixes to follow new PEAR coding standards. +* fixed 2 tests that failed when running tests against the live server, +* make sure explode() splits the validate response in two tokens only, +* Services_ReCaptcha has now documentation in docbook format. </notes> <contents> <dir name="/"> @@ -159,5 +160,23 @@ </notes> </release> + <!-- version 0.2.2 --> + <release> + <date>2010-01-04</date> + <version> + <release>0.2.2</release> + <api>0.2.2</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> + <license uri="http://www.opensource.org/licenses/mit-license.html">MIT</license> + <notes> +* All setters now return the current instance to allow chaining of set calls, +* Some fixes to follow new PEAR coding standards. + </notes> + </release> + </changelog> </package> Modified: pear/packages/Services_ReCaptcha/trunk/tests/test_errors.phpt =================================================================== --- pear/packages/Services_ReCaptcha/trunk/tests/test_errors.phpt 2010-04-10 13:03:07 UTC (rev 297800) +++ pear/packages/Services_ReCaptcha/trunk/tests/test_errors.phpt 2010-04-10 13:04:21 UTC (rev 297801) @@ -22,7 +22,7 @@ $recaptcha->apiVerifyURL = 'http://api-verify.recaptcha.net/foo'; if (!$livetest) { $mock = new HTTP_Request2_Adapter_Mock(); - $resp = new HTTP_Request2_Response('HTTP/1.1 405 Not Allowed', false); + $resp = new HTTP_Request2_Response('HTTP/1.1 404 Not Found', false); $mock->addResponse($resp); $request = $recaptcha->getRequest(); $request->setAdapter($mock); @@ -39,5 +39,5 @@ ?> --EXPECT-- Absolute URL required -Not Allowed +Not Found HTTP_Request2_Response Modified: pear/packages/Services_ReCaptcha/trunk/tests/test_validate.phpt =================================================================== --- pear/packages/Services_ReCaptcha/trunk/tests/test_validate.phpt 2010-04-10 13:03:07 UTC (rev 297800) +++ pear/packages/Services_ReCaptcha/trunk/tests/test_validate.phpt 2010-04-10 13:04:21 UTC (rev 297801) @@ -31,7 +31,9 @@ if (!$livetest) { $mock = new HTTP_Request2_Adapter_Mock(); $resp = new HTTP_Request2_Response('HTTP/1.1 200 Ok', false); - $resp->appendBody("false\ninvalid-site-private-key"); + $resp->appendBody("false\n'Input error: challenge: Error parsing " + . "captcha challenge value\\nprivatekey: Format of site key was " + . "invalid\\n'"); $mock->addResponse($resp); $recaptcha->getRequest()->setAdapter($mock); } @@ -57,5 +59,5 @@ ?> --EXPECT-- unknown -invalid-site-private-key +'Input error: challenge: Error parsing captcha challenge value\nprivatekey: Format of site key was invalid\n'

« previous php.pear.cvs (#59235) next »