Completed
Push — master ( bcb499...5b29f8 )
by Dan Michael O.
02:13
created

RequestsSpec::it_is_countable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\Scriptotek\Alma\Users;
4
5
use Scriptotek\Alma\Client as AlmaClient;
6
use Scriptotek\Alma\Users\Requests;
7
use PhpSpec\ObjectBehavior;
8
use Prophecy\Argument;
9
use spec\Scriptotek\Alma\SpecHelper;
10
11
class RequestsSpec extends ObjectBehavior
12
{
13
    public function let(AlmaClient $client)
14
    {
15
        $url = '/bibs/1/holdings/2/items/3/requests';
16
        $this->beConstructedWith($client, $url);
17
    }
18
19
    public function it_is_countable(AlmaClient $client)
20
    {
21
        $client->getJSON('/bibs/1/holdings/2/items/3/requests')
22
            ->shouldBeCalled()
23
            ->willReturn(SpecHelper::getDummyData('item_requests_response.json'));
24
25
        $this->shouldHaveCount(1);
26
    }
27
28
29
    function it_is_initializable()
30
    {
31
        $this->shouldHaveType(Requests::class);
32
    }
33
}
34