Completed
Push — master ( ea4e5e...1a7580 )
by Zbigniew
02:25
created

FactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the WrikeBundle package.
4
 *
5
 * (c) Zbigniew Ślązak
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Zibios\Bundle\WrikeBundle\Tests\Api;
12
13
use Zibios\Bundle\WrikeBundle\Api\Factory;
14
use Zibios\Bundle\WrikeBundle\Tests\TestCase;
15
use Zibios\WrikePhpLibrary\Api;
16
17
/**
18
 * FactoryTest
19
 */
20
class FactoryTest extends TestCase
21
{
22
    public function test_create()
23
    {
24
        $api = Factory::create();
25
        self::assertInstanceOf(Api::class, $api);
26
        self::assertEquals('', $api->getBearerToken());
27
    }
28
29
    public function test_createForPermanentToken()
30
    {
31
        $token = 'TestToken';
32
        $api = Factory::createForPermanentToken($token);
33
        self::assertInstanceOf(Api::class, $api);
34
        self::assertEquals($token, $api->getBearerToken());
35
    }
36
}
37