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

SteamTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
dl 0
loc 26
rs 10
c 2
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getProviderClassName() 0 3 1
A testParseUserIdFromIdentity() 0 16 1
1
<?php
2
/**
3
 * @author Patsura Dmitry https://github.com/ovr <[email protected]>
4
 */
5
6
namespace Test\OpenID\Provider;
7
8
class SteamTest extends AbstractProviderTestCase
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    protected function getProviderClassName()
14
    {
15
        return \SocialConnect\OpenID\Provider\Steam::class;
16
    }
17
18
    public function testParseUserIdFromIdentity()
19
    {
20
        $expectedUserId = 76561198066894048;
21
        $provider = $this->getProvider();
22
23
        $result = parent::callProtectedMethod(
24
            $provider,
25
            'parseUserIdFromIdentity',
26
            [
27
                'http://steamcommunity.com/openid/id/76561198066894048'
28
            ]
29
        );
30
31
        parent::assertEquals(
32
            $expectedUserId,
33
            $result
34
        );
35
    }
36
}
37