it_will_create_repo_facade()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 11
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 4
1
<?php
2
3
namespace spec\DevBoardLib\GithubObjectApiFacade\Repo;
4
5
use DevBoardLib\GithubApiFacade\Auth\GithubAccessToken;
6
use DevBoardLib\GithubApiFacade\Repo\RepoFacade;
7
use DevBoardLib\GithubApiFacade\Repo\RepoFacadeFactory as WrappedRepoFacadeFactory;
8
use DevBoardLib\GithubCore\Repo\GithubRepo;
9
use PhpSpec\ObjectBehavior;
10
use Prophecy\Argument;
11
12 View Code Duplication
class RepoFacadeFactorySpec 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...
13
{
14
    public function it_is_initializable()
15
    {
16
        $this->shouldHaveType('DevBoardLib\GithubObjectApiFacade\Repo\RepoFacadeFactory');
17
    }
18
19
    public function let(WrappedRepoFacadeFactory $wrappedRepoFacadeFactory)
20
    {
21
        $this->beConstructedWith($wrappedRepoFacadeFactory);
22
    }
23
24
    public function it_will_create_repo_facade(
25
        $wrappedRepoFacadeFactory,
26
        GithubRepo $githubRepo,
27
        GithubAccessToken $user,
28
        RepoFacade $repoFacade
29
    ) {
30
        $wrappedRepoFacadeFactory->create($githubRepo, $user)->willReturn($repoFacade);
31
32
        $this->create($githubRepo, $user)
33
            ->shouldReturnAnInstanceOf('DevBoardLib\GithubObjectApiFacade\Repo\SimpleRepoFacade');
34
    }
35
}
36