Completed
Push — master ( 4c45e0...1a7b7a )
by Дмитрий
02:22
created

AccessTokenTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstructMethod() 0 7 1
A testGetUserId() 0 8 1
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace Test\OAuth1;
8
9
use SocialConnect\OAuth1\AccessToken;
10
11
class AccessTokenTest extends \Test\TestCase
12
{
13
    public function testConstructMethod()
14
    {
15
        $token = new AccessToken('key', 'secret');
16
        $this->assertEquals('key', $token->getKey());
17
        $this->assertEquals('secret', $token->getSecret());
18
19
        return $token;
20
    }
21
22
    public function testGetUserId()
23
    {
24
        $token = $this->testConstructMethod();
25
        $this->assertNull($token->getUserId());
26
27
        $userId = 12345;
28
        $token->setUserId($userId);
29
        $this->assertSame($userId, $token->getUserId());
30
    }
31
}
32