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

GithubUserSourceSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 5 1
A let() 0 4 1
A it_exposes_all_constructor_params_via_getters() 0 13 1
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