GithubCommitStatusConverterSpec   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 27
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 6 1
A let() 0 5 1
A provideCommitStatuses() 0 6 1
A getDataProvider() 0 4 1
1
<?php
2
3
namespace spec\DevBoardLib\GithubObjectApiFacade\Repo\CommitStatus\Converter;
4
5
use DevBoardLib\GithubCore\Repo\GithubRepo;
6
use DevBoardLib\GithubCore\Repo\GithubRepoId;
7
use PhpSpec\ObjectBehavior;
8
use Prophecy\Argument;
9
use tests\DevBoardLib\GithubObjectApiFacade\SampleDataProvider;
10
11
class GithubCommitStatusConverterSpec extends ObjectBehavior
12
{
13
    public function it_is_initializable()
14
    {
15
        $this->shouldHaveType(
16
            'DevBoardLib\GithubObjectApiFacade\Repo\CommitStatus\Converter\GithubCommitStatusConverter'
17
        );
18
    }
19
20
    public function let(GithubRepo $githubRepo, GithubRepoId $repoId)
21
    {
22
        $githubRepo->getId()->willReturn($repoId);
23
        $this->beConstructedWith($githubRepo);
24
    }
25
26
    public function provideCommitStatuses()
27
    {
28
        return [
29
            [$this->getDataProvider()->getCommitStatus()],
30
        ];
31
    }
32
33
    protected function getDataProvider()
34
    {
35
        return new SampleDataProvider();
36
    }
37
}
38