KnpLabsClientFactorySpec::it_is_initializable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace spec\DevBoardLib\GithubApiFacade\Client;
4
5
use DevBoardLib\GithubApiFacade\Auth\GithubAccessToken;
6
use PhpSpec\ObjectBehavior;
7
use Prophecy\Argument;
8
9
class KnpLabsClientFactorySpec extends ObjectBehavior
10
{
11
    public function it_is_initializable()
12
    {
13
        $this->shouldHaveType('DevBoardLib\GithubApiFacade\Client\KnpLabsClientFactory');
14
        $this->shouldHaveType('DevBoardLib\GithubApiFacade\Client\ClientFactory');
15
    }
16
17
    public function it_will_return_token_authenticated_github_client(GithubAccessToken $user)
18
    {
19
        $this->createTokenAuthenticatedClient($user)
20
            ->shouldReturnAnInstanceOf('Github\Client');
21
    }
22
    public function it_will_return_unauthenticated_github_client()
23
    {
24
        $this->createUnauthenticatedClient()
25
            ->shouldReturnAnInstanceOf('Github\Client');
26
    }
27
}
28