it_will_create_repo_facade()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 6
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 6
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace spec\DevBoardLib\GithubApiFacade\User;
4
5
use DevBoardLib\GithubApiFacade\Auth\GithubAccessToken;
6
use DevBoardLib\GithubApiFacade\Client\ClientFactory;
7
use Github\Client;
8
use PhpSpec\ObjectBehavior;
9
use Prophecy\Argument;
10
11 View Code Duplication
class UserFacadeFactorySpec extends ObjectBehavior
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    public function let(ClientFactory $clientFactory)
14
    {
15
        $this->beConstructedWith($clientFactory);
16
    }
17
18
    public function it_is_initializable()
19
    {
20
        $this->shouldHaveType('DevBoardLib\GithubApiFacade\User\UserFacadeFactory');
21
    }
22
23
    public function it_will_create_repo_facade($clientFactory, GithubAccessToken $user, Client $client)
24
    {
25
        $clientFactory->createTokenAuthenticatedClient($user)->willReturn($client);
26
        $this->create($user)
27
            ->shouldReturnAnInstanceOf('DevBoardLib\GithubApiFacade\User\PaginatedKnpLabsUserFacade');
28
    }
29
}
30