LinkSpec::let()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\TomPHP\HalClient\Resource;
4
5
use PhpSpec\ObjectBehavior;
6
use TomPHP\HalClient\ResourceFetcher;
7
use TomPHP\HalClient\Resource\Resource;
8
9
class LinkSpec extends ObjectBehavior
10
{
11
    function let(ResourceFetcher $fetcher)
12
    {
13
        $this->beConstructedWith($fetcher, 'test_href');
14
    }
15
16
    function it_makes_a_request_to_the_link(ResourceFetcher $fetcher)
17
    {
18
        $resource = new Resource([]);
19
20
        $fetcher->get('test_href')->willReturn($resource);
21
22
        $this->get()->shouldReturn($resource);
23
    }
24
}
25