blob: 1a895fbcacf285fed60eaaff17be8e3e54a3669f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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());
}
}
|