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

GithubCommitStatusConverterSpec::getDataProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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