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

FactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 18
rs 10
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace Test\Provider;
8
9
use SocialConnect\Auth\Factory;
10
use SocialConnect\Auth\Service;
11
12
class FactoryTest extends \Test\TestCase
13
{
14
    public function testSuccessFactory()
15
    {
16
        $service = new Service(array(), null);
17
18
        $vkProvider = (new Factory)->factory('Vk', array(
19
            'applicationId' => 'applicationIdTest',
20
            'applicationSecret' => 'applicationSecretTest'
21
        ), $service);
22
23
        $this->assertInstanceOf(\SocialConnect\Auth\Provider\Vk::class, $vkProvider);
24
        $consumer = $vkProvider->getConsumer();
25
26
        $this->assertSame('applicationIdTest', $consumer->getKey());
27
        $this->assertSame('applicationSecretTest', $consumer->getSecret());
28
    }
29
}
30