Completed
Pull Request — master (#8)
by Miro
03:40
created

GithubCommitStatusConverterSpec   A

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