From be1668a1bd8436952bd9ee36ed710fae9834643f Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 7 Oct 2010 19:24:24 -0700 Subject: Renamed the OAuth verify credentials test script --- tests/oauth/oauth_verify_creds.php | 107 +++++++++++++++++++++++++++++++++++++ tests/oauth/verifycreds.php | 107 ------------------------------------- 2 files changed, 107 insertions(+), 107 deletions(-) create mode 100755 tests/oauth/oauth_verify_creds.php delete mode 100755 tests/oauth/verifycreds.php diff --git a/tests/oauth/oauth_verify_creds.php b/tests/oauth/oauth_verify_creds.php new file mode 100755 index 000000000..7eea6e7e7 --- /dev/null +++ b/tests/oauth/oauth_verify_creds.php @@ -0,0 +1,107 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); + +require_once INSTALLDIR . '/extlib/OAuth.php'; + +$shortoptions = 't:s:'; +$longoptions = array('oauth_token=', 'oauth_token_secret='); + +$helptext = <<sign_request($hmac_method, $consumer, $atok); + + $httpReq = httpRequest($oauthReq->to_url()); + +} catch (Exception $e) { + print "Error! HTTP response body: " . $httpReq->getBody(); + exit(1); +} + +print $httpReq->getBody(); + +function httpRequest($url) +{ + $request = HTTPClient::start(); + + $request->setConfig( + array( + 'follow_redirects' => true, + 'connect_timeout' => 120, + 'timeout' => 120, + 'ssl_verify_peer' => false, + 'ssl_verify_host' => false + ) + ); + + return $request->get($url); +} diff --git a/tests/oauth/verifycreds.php b/tests/oauth/verifycreds.php deleted file mode 100755 index 7eea6e7e7..000000000 --- a/tests/oauth/verifycreds.php +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env php -. - */ - -define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); - -require_once INSTALLDIR . '/extlib/OAuth.php'; - -$shortoptions = 't:s:'; -$longoptions = array('oauth_token=', 'oauth_token_secret='); - -$helptext = <<sign_request($hmac_method, $consumer, $atok); - - $httpReq = httpRequest($oauthReq->to_url()); - -} catch (Exception $e) { - print "Error! HTTP response body: " . $httpReq->getBody(); - exit(1); -} - -print $httpReq->getBody(); - -function httpRequest($url) -{ - $request = HTTPClient::start(); - - $request->setConfig( - array( - 'follow_redirects' => true, - 'connect_timeout' => 120, - 'timeout' => 120, - 'ssl_verify_peer' => false, - 'ssl_verify_host' => false - ) - ); - - return $request->get($url); -} -- cgit v1.2.3-54-g00ecf