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

FactoryTest::test_createForPermanentToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 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