CredentialsTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
dl 0
loc 28
c 1
b 0
f 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetCallbackUrl() 0 5 1
A testGetConsumerId() 0 5 1
A testConstructCorrectInterface() 0 5 1
A testGetConsumerSecret() 0 5 1
1
<?php
2
3
namespace OAuth\Unit\Common\Consumer;
4
5
use OAuth\Common\Consumer\Credentials;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Class CredentialsTest.
10
 *
11
 * @coversDefaultClass \Credentials
12
 */
13
class CredentialsTest extends TestCase
14
{
15
    public function testConstructCorrectInterface(): void
16
    {
17
        $credentials = new Credentials('foo', 'bar', 'baz');
18
19
        self::assertInstanceOf('\\OAuth\\Common\\Consumer\\CredentialsInterface', $credentials);
20
    }
21
22
    public function testGetConsumerId(): void
23
    {
24
        $credentials = new Credentials('foo', 'bar', 'baz');
25
26
        self::assertSame('foo', $credentials->getConsumerId());
27
    }
28
29
    public function testGetConsumerSecret(): void
30
    {
31
        $credentials = new Credentials('foo', 'bar', 'baz');
32
33
        self::assertSame('bar', $credentials->getConsumerSecret());
34
    }
35
36
    public function testGetCallbackUrl(): void
37
    {
38
        $credentials = new Credentials('foo', 'bar', 'baz');
39
40
        self::assertSame('baz', $credentials->getCallbackUrl());
41
    }
42
}
43