LinkSpec   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_makes_a_request_to_the_link() 0 8 1
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