Completed
Pull Request — master (#479)
by Andrey
02:39
created

CredentialsTest::testGetConsumerSecret()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace OAuth\Unit\Common\Consumer;
4
5
use OAuth\Common\Consumer\Credentials;
6
7
class CredentialsTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @covers OAuth\Common\Consumer\Credentials::__construct
11
     */
12
    public function testConstructCorrectInterface()
13
    {
14
        $credentials = new Credentials('foo', 'bar', 'baz');
15
16
        $this->assertInstanceOf('\\OAuth\\Common\\Consumer\\CredentialsInterface', $credentials);
17
    }
18
19
    /**
20
     * @covers OAuth\Common\Consumer\Credentials::__construct
21
     * @covers OAuth\Common\Consumer\Credentials::getConsumerId
22
     */
23
    public function testGetConsumerId()
24
    {
25
        $credentials = new Credentials('foo', 'bar', 'baz');
26
27
        $this->assertSame('foo', $credentials->getConsumerId());
28
    }
29
30
    /**
31
     * @covers OAuth\Common\Consumer\Credentials::__construct
32
     * @covers OAuth\Common\Consumer\Credentials::getConsumerSecret
33
     */
34
    public function testGetConsumerSecret()
35
    {
36
        $credentials = new Credentials('foo', 'bar', 'baz');
37
38
        $this->assertSame('bar', $credentials->getConsumerSecret());
39
    }
40
41
    /**
42
     * @covers OAuth\Common\Consumer\Credentials::__construct
43
     * @covers OAuth\Common\Consumer\Credentials::getCallbackUrl
44
     */
45
    public function testGetCallbackUrl()
46
    {
47
        $credentials = new Credentials('foo', 'bar', 'baz');
48
49
        $this->assertSame('baz', $credentials->getCallbackUrl());
50
    }
51
}
52