diff options
Diffstat (limited to 'vendor/lusitanian/oauth/tests/Unit/Common/Consumer/CredentialsTest.php')
-rw-r--r-- | vendor/lusitanian/oauth/tests/Unit/Common/Consumer/CredentialsTest.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/vendor/lusitanian/oauth/tests/Unit/Common/Consumer/CredentialsTest.php b/vendor/lusitanian/oauth/tests/Unit/Common/Consumer/CredentialsTest.php new file mode 100644 index 00000000..1a895fbc --- /dev/null +++ b/vendor/lusitanian/oauth/tests/Unit/Common/Consumer/CredentialsTest.php @@ -0,0 +1,51 @@ +<?php + +namespace OAuth\Unit\Common\Consumer; + +use OAuth\Common\Consumer\Credentials; + +class CredentialsTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers OAuth\Common\Consumer\Credentials::__construct + */ + public function testConstructCorrectInterface() + { + $credentials = new Credentials('foo', 'bar', 'baz'); + + $this->assertInstanceOf('\\OAuth\\Common\\Consumer\\CredentialsInterface', $credentials); + } + + /** + * @covers OAuth\Common\Consumer\Credentials::__construct + * @covers OAuth\Common\Consumer\Credentials::getConsumerId + */ + public function testGetConsumerId() + { + $credentials = new Credentials('foo', 'bar', 'baz'); + + $this->assertSame('foo', $credentials->getConsumerId()); + } + + /** + * @covers OAuth\Common\Consumer\Credentials::__construct + * @covers OAuth\Common\Consumer\Credentials::getConsumerSecret + */ + public function testGetConsumerSecret() + { + $credentials = new Credentials('foo', 'bar', 'baz'); + + $this->assertSame('bar', $credentials->getConsumerSecret()); + } + + /** + * @covers OAuth\Common\Consumer\Credentials::__construct + * @covers OAuth\Common\Consumer\Credentials::getCallbackUrl + */ + public function testGetCallbackUrl() + { + $credentials = new Credentials('foo', 'bar', 'baz'); + + $this->assertSame('baz', $credentials->getCallbackUrl()); + } +} |