Completed
Push — master ( 47778c...ba169d )
by Dan Michael O.
10:36
created

LoanSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 5 1
A it_is_initializable() 0 4 1
A it_can_exist() 0 6 1
1
<?php
2
3
namespace spec\Scriptotek\Alma\Users;
4
5
use Scriptotek\Alma\Bibs\Item;
6
use Scriptotek\Alma\Client as AlmaClient;
7
use Scriptotek\Alma\Users\Loan;
8
use PhpSpec\ObjectBehavior;
9
use Prophecy\Argument;
10
use Scriptotek\Alma\Users\User;
11
use spec\Scriptotek\Alma\SpecHelper;
12
13
class LoanSpec extends ObjectBehavior
14
{
15
    public function let(AlmaClient $client, User $user, Item $item)
16
    {
17
        $loan_id = '123';
18
        $this->beConstructedWith($client, $user, $item, $loan_id);
19
    }
20
21
    public function it_is_initializable()
22
    {
23
        $this->shouldHaveType(Loan::class);
24
    }
25
26
    public function it_can_exist()
27
    {
28
    	$this->init(SpecHelper::getDummyData('item_loan_response.json')->item_loan[0]);
29
30
        $this->exists()->shouldBe(true);
31
    }
32
}
33