diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-06 06:57:39 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-06 06:57:39 -0500 |
commit | 420d0ca4dd6cf075204867de28c2e6d5b1b68184 (patch) | |
tree | e7723f4b0687d82300ca5b4d38e3ab0ff3fc13cf /vendor/lusitanian/oauth/tests/Mocks | |
parent | cfe1e13d4a2b964c950b5e3daa8cafab207f1158 (diff) |
Remove vendor again
Diffstat (limited to 'vendor/lusitanian/oauth/tests/Mocks')
6 files changed, 0 insertions, 253 deletions
diff --git a/vendor/lusitanian/oauth/tests/Mocks/Common/FakeProject/NS/SomeClass.php b/vendor/lusitanian/oauth/tests/Mocks/Common/FakeProject/NS/SomeClass.php deleted file mode 100644 index c033c4e2..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/Common/FakeProject/NS/SomeClass.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -namespace FakeProject\NS; - -class SomeClass -{ - public function isLoaded() - { - return true; - } -} diff --git a/vendor/lusitanian/oauth/tests/Mocks/Common/Service/Mock.php b/vendor/lusitanian/oauth/tests/Mocks/Common/Service/Mock.php deleted file mode 100644 index a812c7d1..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/Common/Service/Mock.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -namespace OAuthTest\Mocks\Common\Service; - -use OAuth\Common\Service\AbstractService; -use OAuth\Common\Http\Uri\UriInterface; - -class Mock extends AbstractService -{ - /** - * Sends an authenticated API request to the path provided. - * If the path provided is not an absolute URI, the base API Uri (service-specific) will be used. - * - * @param string|UriInterface $path - * @param string $method HTTP method - * @param array $body Request body if applicable (an associative array will - * automatically be converted into a urlencoded body) - * @param array $extraHeaders Extra headers if applicable. These will override service-specific - * any defaults. - * - * @return string - */ - public function request($path, $method = 'GET', $body = null, array $extraHeaders = array()) - { - } - - /** - * Returns the url to redirect to for authorization purposes. - * - * @param array $additionalParameters - * - * @return UriInterface - */ - public function getAuthorizationUri(array $additionalParameters = array()) - { - } - - /** - * Returns the authorization API endpoint. - * - * @return UriInterface - */ - public function getAuthorizationEndpoint() - { - } - - /** - * Returns the access token API endpoint. - * - * @return UriInterface - */ - public function getAccessTokenEndpoint() - { - } - - public function testDetermineRequestUriFromPath($path, UriInterface $baseApiUri = null) - { - return $this->determineRequestUriFromPath($path, $baseApiUri); - } -} diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php deleted file mode 100644 index 5dac52e7..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -namespace OAuthTest\Mocks\OAuth1\Service; - -use OAuth\OAuth1\Service\AbstractService; -use OAuth\Common\Consumer\CredentialsInterface; -use OAuth\Common\Http\Client\ClientInterface; -use OAuth\Common\Storage\TokenStorageInterface; -use OAuth\OAuth1\Signature\SignatureInterface; -use OAuth\Common\Http\Uri\UriInterface; - -class Fake extends AbstractService -{ - public function __construct( - CredentialsInterface $credentials, - ClientInterface $httpClient, - TokenStorageInterface $storage, - SignatureInterface $signature, - UriInterface $baseApiUri = null - ) { - } - - /** - * {@inheritdoc} - */ - public function getRequestTokenEndpoint() - { - } - - /** - * {@inheritdoc} - */ - public function getAuthorizationEndpoint() - { - } - - /** - * {@inheritdoc} - */ - public function getAccessTokenEndpoint() - { - } - - /** - * {@inheritdoc} - */ - protected function parseRequestTokenResponse($responseBody) - { - } - - /** - * {@inheritdoc} - */ - protected function parseAccessTokenResponse($responseBody) - { - } -} diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Mock.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Mock.php deleted file mode 100644 index 9f0bf27f..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Mock.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace OAuthTest\Mocks\OAuth1\Service; - -use OAuth\OAuth1\Service\AbstractService; -use OAuth\Common\Http\Uri\Uri; -use OAuth\OAuth1\Token\StdOAuth1Token; - -class Mock extends AbstractService -{ - public function getRequestTokenEndpoint() - { - return new Uri('http://pieterhordijk.com/token'); - } - - public function getAuthorizationEndpoint() - { - return new Uri('http://pieterhordijk.com/auth'); - } - - public function getAccessTokenEndpoint() - { - return new Uri('http://pieterhordijk.com/access'); - } - - protected function parseRequestTokenResponse($responseBody) - { - return new StdOAuth1Token(); - } - - protected function parseAccessTokenResponse($responseBody) - { - return new StdOAuth1Token(); - } -} diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Fake.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Fake.php deleted file mode 100644 index d8de2b00..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Fake.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace OAuthTest\Mocks\OAuth2\Service; - -use OAuth\OAuth2\Service\AbstractService; - -class Fake extends AbstractService -{ - const SCOPE_FOO = 'https://www.pieterhordijk.com/auth'; - const SCOPE_CUSTOM = 'custom'; - - /** - * {@inheritdoc} - */ - public function getAuthorizationEndpoint() - { - } - - /** - * {@inheritdoc} - */ - public function getAccessTokenEndpoint() - { - } - - /** - * {@inheritdoc} - */ - protected function parseAccessTokenResponse($responseBody) - { - } -} diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php deleted file mode 100644 index 508aea00..00000000 --- a/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace OAuthTest\Mocks\OAuth2\Service; - -use OAuth\OAuth2\Service\AbstractService; -use OAuth\Common\Http\Uri\Uri; -use OAuth\OAuth2\Token\StdOAuth2Token; - -class Mock extends AbstractService -{ - const SCOPE_MOCK = 'mock'; - const SCOPE_MOCK_2 = 'mock2'; - - private $authorizationMethod = null; - - public function getAuthorizationEndpoint() - { - return new Uri('http://pieterhordijk.com/auth'); - } - - public function getAccessTokenEndpoint() - { - return new Uri('http://pieterhordijk.com/access'); - } - - protected function parseAccessTokenResponse($responseBody) - { - return new StdOAuth2Token(); - } - - // this allows us to set different auth methods for tests - public function setAuthorizationMethod($method) - { - $this->authorizationMethod = $method; - } - - /** - * Returns a class constant from ServiceInterface defining the authorization method used for the API - * Header is the sane default. - * - * @return int - */ - protected function getAuthorizationMethod() - { - switch($this->authorizationMethod) { - case 'querystring': - return static::AUTHORIZATION_METHOD_QUERY_STRING; - - case 'querystring2': - return static::AUTHORIZATION_METHOD_QUERY_STRING_V2; - - case 'bearer': - return static::AUTHORIZATION_METHOD_HEADER_BEARER; - } - - return parent::getAuthorizationMethod(); - } -} |