Completed
Push — master ( df502b...4c9fbf )
by Rémi
17s
created

TeamWorkerSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A let() 0 10 1
A it_should_be_hydrated() 0 6 1
1
<?php
2
3
namespace spec\Yproximite\Api\Model\TeamWorker;
4
5
use PhpSpec\ObjectBehavior;
6
7
use Yproximite\Api\Model\TeamWorker\TeamWorker;
8
9
class TeamWorkerSpec extends ObjectBehavior
10
{
11
    function it_is_initializable()
12
    {
13
        $this->shouldHaveType(TeamWorker::class);
14
    }
15
16
    function let()
17
    {
18
        $data = [
19
            'id'        => '1',
20
            'lastName'  => 'Bob',
21
            'firstName' => 'Morane',
22
        ];
23
24
        $this->beConstructedWith($data);
25
    }
26
27
    function it_should_be_hydrated()
28
    {
29
        $this->getId()->shouldReturn(1);
30
        $this->getLastName()->shouldReturn('Bob');
31
        $this->getFirstName()->shouldReturn('Morane');
32
    }
33
}
34