Completed
Pull Request — master (#1)
by Miro
03:33
created

GithubUserSourceSpec::let()   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 5
1
<?php
2
namespace spec\DevBoardLib\GithubObjectApiFacade\User;
3
4
use DevBoardLib\GithubCore\User\GithubUserId;
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
8
class GithubUserSourceSpec extends ObjectBehavior
9
{
10
    public function it_is_initializable()
11
    {
12
        $this->shouldHaveType('DevBoardLib\GithubObjectApiFacade\User\GithubUserSource');
13
        $this->shouldHaveType('DevBoardLib\GithubCore\User\GithubUser');
14
    }
15
16
    public function let(GithubUserId $githubUserId, $username, $email, $name, $avatarUrl)
17
    {
18
        $this->beConstructedWith($githubUserId, $username, $email, $name, $avatarUrl);
19
    }
20
21
    public function it_exposes_all_constructor_params_via_getters(
22
        $githubUserId,
23
        $username,
24
        $email,
25
        $name,
26
        $avatarUrl
27
    ) {
28
        $this->getGithubUserId()->shouldReturn($githubUserId);
29
        $this->getUsername()->shouldReturn($username);
30
        $this->getEmail()->shouldReturn($email);
31
        $this->getName()->shouldReturn($name);
32
        $this->getAvatarUrl()->shouldReturn($avatarUrl);
33
    }
34
}
35