From 204ec8b42fcbc6f05d024b5e2c3cc5204159c48d Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Fri, 8 Feb 2013 10:32:26 +0000 Subject: [PATCH] Renamed namespace to JacobKiers --- composer.json | 2 +- .../OAuth/Client.php | 6 +- .../OAuth/Credential.php | 6 +- .../OAuth/DataStore.php | 20 +++---- .../OAuth/HmacSha1.php | 12 ++-- .../OAuth/NullToken.php | 6 +- .../OAuth/OAuthException.php | 6 +- .../OAuth/PlainText.php | 12 ++-- .../OAuth/Request.php | 24 ++++---- .../OAuth/RsaSha1.php | 19 +++--- .../OAuth/Server.php | 60 +++++++++---------- .../OAuth/SignatureMethod.php | 22 +++---- src/{GaryJones => JacobKiers}/OAuth/Token.php | 6 +- src/{GaryJones => JacobKiers}/OAuth/Util.php | 8 +-- tests/ClientTest.php | 2 +- tests/HmacSha1Test.php | 8 +-- tests/PlainTextTest.php | 8 +-- tests/RequestTest.php | 2 +- tests/SignatureMethodTest.php | 12 ++-- tests/TokenTest.php | 6 +- 20 files changed, 123 insertions(+), 124 deletions(-) rename src/{GaryJones => JacobKiers}/OAuth/Client.php (89%) rename src/{GaryJones => JacobKiers}/OAuth/Credential.php (88%) rename src/{GaryJones => JacobKiers}/OAuth/DataStore.php (76%) rename src/{GaryJones => JacobKiers}/OAuth/HmacSha1.php (84%) rename src/{GaryJones => JacobKiers}/OAuth/NullToken.php (82%) rename src/{GaryJones => JacobKiers}/OAuth/OAuthException.php (62%) rename src/{GaryJones => JacobKiers}/OAuth/PlainText.php (81%) rename src/{GaryJones => JacobKiers}/OAuth/Request.php (95%) rename src/{GaryJones => JacobKiers}/OAuth/RsaSha1.php (86%) rename src/{GaryJones => JacobKiers}/OAuth/Server.php (84%) rename src/{GaryJones => JacobKiers}/OAuth/SignatureMethod.php (75%) rename src/{GaryJones => JacobKiers}/OAuth/Token.php (88%) rename src/{GaryJones => JacobKiers}/OAuth/Util.php (96%) diff --git a/composer.json b/composer.json index 0b2bc18..86303ec 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ }, "autoload": { "psr-0": { - "GaryJones\\OAuth": "src/" + "JacobKiers\\OAuth": "src/" } } } diff --git a/src/GaryJones/OAuth/Client.php b/src/JacobKiers/OAuth/Client.php similarity index 89% rename from src/GaryJones/OAuth/Client.php rename to src/JacobKiers/OAuth/Client.php index fd8dfcf..51b3f6c 100644 --- a/src/GaryJones/OAuth/Client.php +++ b/src/JacobKiers/OAuth/Client.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Client holds the properties of a single client / consumer. diff --git a/src/GaryJones/OAuth/Credential.php b/src/JacobKiers/OAuth/Credential.php similarity index 88% rename from src/GaryJones/OAuth/Credential.php rename to src/JacobKiers/OAuth/Credential.php index 79c5d53..239ecf6 100644 --- a/src/GaryJones/OAuth/Credential.php +++ b/src/JacobKiers/OAuth/Credential.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Credential is the blueprint for all key + secret classes. diff --git a/src/GaryJones/OAuth/DataStore.php b/src/JacobKiers/OAuth/DataStore.php similarity index 76% rename from src/GaryJones/OAuth/DataStore.php rename to src/JacobKiers/OAuth/DataStore.php index e18cb59..659870e 100644 --- a/src/GaryJones/OAuth/DataStore.php +++ b/src/JacobKiers/OAuth/DataStore.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * The actual implementation of validating and assigning tokens is left up to @@ -30,8 +30,8 @@ interface DataStore /** * Validate a token. * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * @param string $token_type Request or access token */ public function lookupToken(Client $client, Token $token, $token_type); @@ -39,8 +39,8 @@ interface DataStore /** * Validate that a nonce has not been used with the same timestamp before. * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * @param string $nonce * @param int $timestamp */ @@ -49,7 +49,7 @@ interface DataStore /** * Return a new token attached to this client. * - * @param GaryJones\OAuth\Client $client + * @param JacobKiers\OAuth\Client $client * @param string $callback URI to store as the post-authorization callback. */ public function newRequestToken(Client $client, $callback = null); @@ -60,8 +60,8 @@ interface DataStore * * Should also invalidate the request token. * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * @param string $verifier */ public function newAccessToken(Client $client, Token $token, $verifier = null); diff --git a/src/GaryJones/OAuth/HmacSha1.php b/src/JacobKiers/OAuth/HmacSha1.php similarity index 84% rename from src/GaryJones/OAuth/HmacSha1.php rename to src/JacobKiers/OAuth/HmacSha1.php index 133c534..164a08c 100644 --- a/src/GaryJones/OAuth/HmacSha1.php +++ b/src/JacobKiers/OAuth/HmacSha1.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * The HMAC-SHA1 signature method. @@ -46,9 +46,9 @@ class HmacSha1 extends SignatureMethod * Please note that the second encoding MUST NOT happen in the SignatureMethod, as * OAuthRequest handles this! * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ diff --git a/src/GaryJones/OAuth/NullToken.php b/src/JacobKiers/OAuth/NullToken.php similarity index 82% rename from src/GaryJones/OAuth/NullToken.php rename to src/JacobKiers/OAuth/NullToken.php index b158bcc..9c7df1f 100644 --- a/src/GaryJones/OAuth/NullToken.php +++ b/src/JacobKiers/OAuth/NullToken.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Token holds the properties of a single token. diff --git a/src/GaryJones/OAuth/OAuthException.php b/src/JacobKiers/OAuth/OAuthException.php similarity index 62% rename from src/GaryJones/OAuth/OAuthException.php rename to src/JacobKiers/OAuth/OAuthException.php index b6c7383..5121dc9 100644 --- a/src/GaryJones/OAuth/OAuthException.php +++ b/src/JacobKiers/OAuth/OAuthException.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Generic exception class. diff --git a/src/GaryJones/OAuth/PlainText.php b/src/JacobKiers/OAuth/PlainText.php similarity index 81% rename from src/GaryJones/OAuth/PlainText.php rename to src/JacobKiers/OAuth/PlainText.php index 6c1794e..38525a8 100644 --- a/src/GaryJones/OAuth/PlainText.php +++ b/src/JacobKiers/OAuth/PlainText.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * PLAINTEXT signature method. @@ -44,9 +44,9 @@ class PlainText extends SignatureMethod * Please note that the second encoding MUST NOT happen in the SignatureMethod, as * OAuthRequest handles this! * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ diff --git a/src/GaryJones/OAuth/Request.php b/src/JacobKiers/OAuth/Request.php similarity index 95% rename from src/GaryJones/OAuth/Request.php rename to src/JacobKiers/OAuth/Request.php index 47dd548..906d65f 100644 --- a/src/GaryJones/OAuth/Request.php +++ b/src/JacobKiers/OAuth/Request.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Handle an OAuth request. @@ -79,7 +79,7 @@ class Request * @param string $http_url Request URL. * @param array $parameters HTTP parameters. * - * @return GaryJones\OAuth\Request + * @return JacobKiers\OAuth\Request */ public static function fromRequest($http_method = null, $http_url = null, $parameters = null) { @@ -131,13 +131,13 @@ class Request /** * Helper function to set up the request. * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * @param string $http_method * @param string $http_url * @param array $parameters * - * @return GaryJones\OAuth\Request + * @return JacobKiers\OAuth\Request */ public static function fromClientAndToken( Client $client, @@ -329,7 +329,7 @@ class Request * * @return string * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ public function toHeader($realm = null) { @@ -373,8 +373,8 @@ class Request * Build signature and add it as parameter. * * @param string $signature_method - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token */ public function signRequest($signature_method, Client $client, Token $token) { @@ -387,8 +387,8 @@ class Request * Build signature. * * @param string $signature_method - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ diff --git a/src/GaryJones/OAuth/RsaSha1.php b/src/JacobKiers/OAuth/RsaSha1.php similarity index 86% rename from src/GaryJones/OAuth/RsaSha1.php rename to src/JacobKiers/OAuth/RsaSha1.php index 9069554..0617e38 100644 --- a/src/GaryJones/OAuth/RsaSha1.php +++ b/src/JacobKiers/OAuth/RsaSha1.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * The RSA-SHA1 signature method. @@ -58,16 +58,15 @@ abstract class RsaSha1 extends SignatureMethod /** * Build up the signature. * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ public function buildSignature(Request $request, Client $client, Token $token = null) { $base_string = $request->getSignatureBaseString(); - //$request->base_string = $base_string; // Fetch the private key cert based on the request $cert = $this->fetchPrivateCert($request); @@ -87,9 +86,9 @@ abstract class RsaSha1 extends SignatureMethod /** * Verifies that a given signature is correct. * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Consumer $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Consumer $client + * @param JacobKiers\OAuth\Token $token * @param string $signature * * @return bool diff --git a/src/GaryJones/OAuth/Server.php b/src/JacobKiers/OAuth/Server.php similarity index 84% rename from src/GaryJones/OAuth/Server.php rename to src/JacobKiers/OAuth/Server.php index 4840963..53575b6 100644 --- a/src/GaryJones/OAuth/Server.php +++ b/src/JacobKiers/OAuth/Server.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * OAuth server. @@ -45,14 +45,14 @@ class Server /** * Data store object reference. * - * @var GaryJones\OAuth\DataStore + * @var JacobKiers\OAuth\DataStore */ protected $data_store; /** * Construct OAuth server instance. * - * @param GaryJones\OAuth\DataStore $data_store + * @param JacobKiers\OAuth\DataStore $data_store */ public function __construct(DataStore $data_store) { @@ -62,7 +62,7 @@ class Server /** * Add a supported signature method. * - * @param GaryJones\OAuth\SignatureMethod $signature_method + * @param JacobKiers\OAuth\SignatureMethod $signature_method */ public function addSignatureMethod(SignatureMethod $signature_method) { @@ -77,9 +77,9 @@ class Server * * Returns the request token on success * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * - * @return GaryJones\OAuth\Token + * @return JacobKiers\OAuth\Token */ public function fetchRequestToken(Request &$request) { @@ -103,9 +103,9 @@ class Server * * Returns the access token on success. * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * - * @return GaryJones\OAuth\Token + * @return JacobKiers\OAuth\Token */ public function fetchAccessToken(Request &$request) { @@ -127,7 +127,7 @@ class Server /** * Verify an api call, checks all the parameters. * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * * @return array Client and Token */ @@ -145,11 +145,11 @@ class Server /** * Check that version is 1.0. * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * * @return string * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function getVersion(Request &$request) { @@ -168,11 +168,11 @@ class Server /** * Get the signature method name, and if it is supported. * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * * @return string Signature method name. * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function getSignatureMethod(Request $request) { @@ -196,11 +196,11 @@ class Server /** * Try to find the client for the provided request's client key. * - * @param GaryJones\OAuth\Request $request + * @param JacobKiers\OAuth\Request $request * - * @return GaryJones\OAuth\Client + * @return JacobKiers\OAuth\Client * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function getClient(Request $request) { @@ -221,13 +221,13 @@ class Server /** * Try to find the token for the provided request's token key. * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client * @param string $token_type * - * @return GaryJones\OAuth\Token + * @return JacobKiers\OAuth\Token * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function getToken(Request $request, Client $client, $token_type = 'access') { @@ -245,11 +245,11 @@ class Server * * Should determine the signature method appropriately * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function checkSignature(Request $request, Client $client, Token $token) { @@ -275,7 +275,7 @@ class Server * * @param int $timestamp * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function checkTimestamp($timestamp) { @@ -293,12 +293,12 @@ class Server /** * Check that the nonce is not repeated * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * @param string $nonce * @param int $timestamp * - * @throws GaryJones\OAuth\OAuthException + * @throws JacobKiers\OAuth\OAuthException */ private function checkNonce(Client $client, Token $token, $nonce, $timestamp) { diff --git a/src/GaryJones/OAuth/SignatureMethod.php b/src/JacobKiers/OAuth/SignatureMethod.php similarity index 75% rename from src/GaryJones/OAuth/SignatureMethod.php rename to src/JacobKiers/OAuth/SignatureMethod.php index 986624c..8ef2e6a 100644 --- a/src/GaryJones/OAuth/SignatureMethod.php +++ b/src/JacobKiers/OAuth/SignatureMethod.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * A class for implementing a Signature Method. @@ -36,9 +36,9 @@ abstract class SignatureMethod * the encoding is handled in OAuthRequest when the final * request is serialized. * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ @@ -47,8 +47,8 @@ abstract class SignatureMethod /** * Get the signature key, made up of client and optionally token shared secrets. * - * @param GaryJones\OAuth\Client $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Client $client + * @param JacobKiers\OAuth\Token $token * * @return string */ @@ -66,9 +66,9 @@ abstract class SignatureMethod /** * Verifies that a given signature is correct. * - * @param GaryJones\OAuth\Request $request - * @param GaryJones\OAuth\Consumer $client - * @param GaryJones\OAuth\Token $token + * @param JacobKiers\OAuth\Request $request + * @param JacobKiers\OAuth\Consumer $client + * @param JacobKiers\OAuth\Token $token * @param string $signature * * @return bool diff --git a/src/GaryJones/OAuth/Token.php b/src/JacobKiers/OAuth/Token.php similarity index 88% rename from src/GaryJones/OAuth/Token.php rename to src/JacobKiers/OAuth/Token.php index 4491c6c..ca9efbb 100644 --- a/src/GaryJones/OAuth/Token.php +++ b/src/JacobKiers/OAuth/Token.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Token holds the properties of a single token. diff --git a/src/GaryJones/OAuth/Util.php b/src/JacobKiers/OAuth/Util.php similarity index 96% rename from src/GaryJones/OAuth/Util.php rename to src/JacobKiers/OAuth/Util.php index f05f58b..2dadf1d 100644 --- a/src/GaryJones/OAuth/Util.php +++ b/src/JacobKiers/OAuth/Util.php @@ -5,11 +5,11 @@ * @package OAuth * @author Andy Smith * @author Gary Jones - * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT - * @link https://github.com/GaryJones/OAuth + * @license https://raw.github.com/jacobkiers/OAuth/master/LICENSE MIT + * @link https://github.com/jacobkiers/OAuth */ -namespace GaryJones\OAuth; +namespace JacobKiers\OAuth; /** * Group of static utility methods. @@ -29,7 +29,7 @@ class Util public static function urlencodeRfc3986($input) { if (is_array($input)) { - return array_map(array('GaryJones\OAuth\Util', 'urlencodeRfc3986'), $input); + return array_map(array('JacobKiers\OAuth\Util', 'urlencodeRfc3986'), $input); } elseif (is_scalar($input)) { return str_replace('+', ' ', str_replace('%7E', '~', rawurlencode($input))); } else { diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 084c88f..5e4188a 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -1,6 +1,6 @@ shouldReceive('getSignatureBaseString') ->withNoArgs() ->andReturn('POST&http%3A%2F%2Fexample.com%2Ffoobar&oauth_signature_method%3DHMAC-SHA1')->once(); @@ -65,14 +65,14 @@ class HmacSha1Test extends PHPUnit_Framework_TestCase private function getClient() { - return m::mock('GaryJones\OAuth\Client', function ($mock) { + return m::mock('JacobKiers\OAuth\Client', function ($mock) { $mock->shouldReceive('getSecret')->withNoArgs()->andReturn('secret')->once(); }); } private function getToken() { - return m::mock('GaryJones\OAuth\Token', function ($mock) { + return m::mock('JacobKiers\OAuth\Token', function ($mock) { $mock->shouldReceive('getSecret')->withNoArgs()->andReturn('token_secret'); }); } diff --git a/tests/PlainTextTest.php b/tests/PlainTextTest.php index e435b8b..f16030f 100644 --- a/tests/PlainTextTest.php +++ b/tests/PlainTextTest.php @@ -1,7 +1,7 @@ shouldReceive('getSecret')->withNoArgs()->andReturn('secret')->once(); }); } private function getToken() { - return m::mock('GaryJones\OAuth\Token', function ($mock) { + return m::mock('JacobKiers\OAuth\Token', function ($mock) { $mock->shouldReceive('getSecret')->withNoArgs()->andReturn('token_secret'); }); } diff --git a/tests/RequestTest.php b/tests/RequestTest.php index 6306ca7..b24f118 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -1,7 +1,7 @@ shouldReceive('getSecret')->withNoArgs()->andReturn('secret')->once(); }); } private function getToken() { - return m::mock('GaryJones\OAuth\Token', function ($mock) { + return m::mock('JacobKiers\OAuth\Token', function ($mock) { $mock->shouldReceive('getSecret')->withNoArgs()->andReturn('token_secret'); }); } diff --git a/tests/TokenTest.php b/tests/TokenTest.php index 85b2801..59acd7a 100644 --- a/tests/TokenTest.php +++ b/tests/TokenTest.php @@ -1,8 +1,8 @@