Completed
Push — master ( 82a3a6...721814 )
by Дмитрий
05:02 queued 02:25
created

AccessTokenTest::testConstructMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace Test\Provider\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