diff options
Diffstat (limited to 'vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service')
-rw-r--r-- | vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php | 57 | ||||
-rw-r--r-- | vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Mock.php | 35 |
2 files changed, 92 insertions, 0 deletions
diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php new file mode 100644 index 00000000..5dac52e7 --- /dev/null +++ b/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Fake.php @@ -0,0 +1,57 @@ +<?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 new file mode 100644 index 00000000..9f0bf27f --- /dev/null +++ b/vendor/lusitanian/oauth/tests/Mocks/OAuth1/Service/Mock.php @@ -0,0 +1,35 @@ +<?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(); + } +} |