OAuthUnitCommonConsumerCredentialsTest

The Gravity Forms Salesforce Add-On OAuth Unit Common Consumer CredentialsTest class.

Defined (1)

The class is defined in the following location(s).

/lib/PHPoAuthLib/tests/Unit/Common/Consumer/CredentialsTest.php  
  1. class CredentialsTest extends \PHPUnit_Framework_TestCase 
  2. /** 
  3. * @covers OAuth\Common\Consumer\Credentials::__construct 
  4. */ 
  5. public function testConstructCorrectInterface() 
  6. $credentials = new Credentials('foo', 'bar', 'baz'); 
  7.  
  8. $this->assertInstanceOf('\\OAuth\\Common\\Consumer\\CredentialsInterface', $credentials); 
  9.  
  10. /** 
  11. * @covers OAuth\Common\Consumer\Credentials::__construct 
  12. * @covers OAuth\Common\Consumer\Credentials::getConsumerId 
  13. */ 
  14. public function testGetConsumerId() 
  15. $credentials = new Credentials('foo', 'bar', 'baz'); 
  16.  
  17. $this->assertSame('foo', $credentials->getConsumerId()); 
  18.  
  19. /** 
  20. * @covers OAuth\Common\Consumer\Credentials::__construct 
  21. * @covers OAuth\Common\Consumer\Credentials::getConsumerSecret 
  22. */ 
  23. public function testGetConsumerSecret() 
  24. $credentials = new Credentials('foo', 'bar', 'baz'); 
  25.  
  26. $this->assertSame('bar', $credentials->getConsumerSecret()); 
  27.  
  28. /** 
  29. * @covers OAuth\Common\Consumer\Credentials::__construct 
  30. * @covers OAuth\Common\Consumer\Credentials::getCallbackUrl 
  31. */ 
  32. public function testGetCallbackUrl() 
  33. $credentials = new Credentials('foo', 'bar', 'baz'); 
  34.  
  35. $this->assertSame('baz', $credentials->getCallbackUrl());