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

TestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
eloc 19
dl 0
loc 29
rs 10
c 3
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getService() 0 27 1
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace Test;
8
9
use SocialConnect\Auth\Service;
10
11
class TestCase extends \PHPUnit\Framework\TestCase
12
{
13
    protected function getService()
14
    {
15
        $httpClient = $this->getMockBuilder(\SocialConnect\Common\Http\Client\Curl::class)
16
            ->disableOriginalConstructor()
17
            ->disableProxyingToOriginalMethods()
18
            ->getMock();
19
20
        $session = $this->getMockBuilder(\SocialConnect\Provider\Session\Session::class)
21
            ->disableOriginalConstructor()
22
            ->disableProxyingToOriginalMethods()
23
            ->getMock();
24
25
        $service = new Service(
26
            $httpClient,
27
            $session,
28
            array(
29
                'provider' => array(
30
                    'Vk' => array(
31
                        'applicationId' => 123456,
32
                        'applicationSecret' => 'Secret'
33
                    )
34
                )
35
            ),
36
            null
37
        );
38
39
        return $service;
40
    }
41
}
42